-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(#2120) GeoRadius support store and storedist option with params #2157
(#2120) GeoRadius support store and storedist option with params #2157
Conversation
LGTM! |
import redis.clients.jedis.util.SafeEncoder; | ||
|
||
public class GeoRadiusStoreParam extends Params { | ||
private static final String STORE = "store"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yangbodong22011 I would have set these (STORE &STOREDIST) as Keywords so you won't have to re-serialize them on each call
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm afraid I don't understand what you mean. Can you give an example?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See redis.clients.jedis.Protocol.Keyword
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gkorland (Almost?) None of the Params classes use Keyword yet. May be we can create a separate issue to improve this?
} | ||
|
||
public byte[][] getByteParams(byte[]... args) { | ||
ArrayList<byte[]> byteParams = new ArrayList<byte[]>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When is that method used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When is that method used?
It is currently useless, I followed GeoRadiusParam
.
} | ||
|
||
public byte[][] getByteKeys(byte[] key) { | ||
List<byte[]> keys = new LinkedList<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think list it an over kill here, you can easily find if you need an array of 2 or 1
|
||
public GeoRadiusStoreParam store(String key) { | ||
if (key != null) { | ||
addParam(STORE, key); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you need it to be Params? it can only be one of the two options.
Params seems like a waste here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yangbodong22011 Please bear some patience. I'm sure @gkorland would jump in whenever he gets some free time. BTW, thanks for your enthusiasm! |
@sazzad16 OK, I will be patient and thank you very much for your reply. |
Resolves #2120
Different from #2140, it is implemented with params.
Closes #2140