Skip to content

Support stralgo command - #2586

Merged
sazzad16 merged 5 commits into
redis:masterfrom
yangbodong22011:feature-stralgo
Aug 7, 2021
Merged

sazzad16 merged 5 commits into
redis:masterfrom
yangbodong22011:feature-stralgo

Conversation

@yangbodong22011

Copy link
Copy Markdown
Contributor

Handle #2328 and Resolves #2583

@sazzad16 sazzad16 left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yangbodong22011 Sorry, for participating late. But there were several aspects that I wanted to address. So a short comment or review was not an option.

  1. If the method name is strAlgoLcs, we already know that the algorithm/subcommand is LCS. Adding StrAlgo algorithm param is just redundant.
  2. Current StrAlgoParams works for LCS but it may not be convenient in future (if any) algorithms for both users and developers. Naming it (StrAlgo)LCSParams seems a safer choice.
  3. For same reason, StringMatchResult may be better to contain LCS. Also put that in resp package.
  4. How about two different methods strAlgoLcs and strAlgoLcsKeys (and the Params without keys option); so that strAlgoLcsKeys can be used in Cluster as well?

ljwlc and others added 2 commits July 30, 2021 09:53
StrAlgoParams for pass params to redis and StringMatchResult is the
result
@yangbodong22011

Copy link
Copy Markdown
Contributor Author

@yangbodong22011 Sorry, for participating late. But there were several aspects that I wanted to address. So a short comment or review was not an option.

  1. If the method name is strAlgoLcs, we already know that the algorithm/subcommand is LCS. Adding StrAlgo algorithm param is just redundant.
  2. Current StrAlgoParams works for LCS but it may not be convenient in future (if any) algorithms for both users and developers. Naming it (StrAlgo)LCSParams seems a safer choice.
  3. For same reason, StringMatchResult may be better to contain LCS. Also put that in resp package.
  4. How about two different methods strAlgoLcs and strAlgoLcsKeys (and the Params without keys option); so that strAlgoLcsKeys can be used in Cluster as well?

@sazzad16 @dengliming thanks, all done, pls review again when you have time.

@sazzad16 sazzad16 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost LGTM!

Sorry to annoy you, but I'm going to nitpick about two things.

  1. Order of method parameters should be: keyA/strA, keyB/strB, params.

@sazzad16 sazzad16 added this to the 3.7.0 milestone Jul 30, 2021
@sazzad16
sazzad16 requested a review from dengliming July 30, 2021 09:55
@sazzad16
sazzad16 self-requested a review July 30, 2021 14:46

@sazzad16 sazzad16 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@sazzad16
sazzad16 merged commit 6de3a6d into redis:master Aug 7, 2021
sazzad16 added a commit that referenced this pull request Aug 7, 2021
* add redis6.0 command `stralgo` support

* Support stralgo command

StrAlgoParams for pass params to redis and StringMatchResult is the
result

* Add strAlgoLCSStrings command and remove strings option from
StrAlgoLCSParams

* Update src/main/java/redis/clients/jedis/resps/LCSMatchResult.java

Co-authored-by: ljwlc <liujinwei@inspur.com>
Co-authored-by: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com>
@chayim chayim mentioned this pull request Jun 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

please implements stralgo method!

5 participants