Skip to content
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

Java: Add command BITCOUNT #263

Merged
merged 5 commits into from
May 6, 2024

Conversation

GumpacG
Copy link

@GumpacG GumpacG commented May 3, 2024

Implement https://redis.io/docs/latest/commands/bitcount/ in the java client.

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>
Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>
@GumpacG GumpacG requested a review from a team May 3, 2024 21:26
Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>
Copy link

@Yury-Fridlyand Yury-Fridlyand left a comment

Choose a reason for hiding this comment

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

Please fix tests

java/client/src/main/java/glide/api/BaseClient.java Outdated Show resolved Hide resolved
Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>
*
* @see <a href="https://redis.io/commands/bitcount/">redis.io</a>
*/
@RequiredArgsConstructor

Choose a reason for hiding this comment

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

you can remove constructor too

@@ -178,6 +179,10 @@ public static BaseTransaction<?> transactionTest(BaseTransaction<?> baseTransact
.pfmerge(hllKey3, new String[] {hllKey1, hllKey2})
.pfcount(new String[] {hllKey3});

baseTransaction.bitcount(key3);
baseTransaction.bitcount(key3, 2, 4);
baseTransaction.bitcount(key3, 2, 19, BitMapOptions.BIT);

Choose a reason for hiding this comment

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

Remove this test - it fails on redis 6.
It is ok to omit it, but if you want to test this in transaction - create a separate test cases for cluster and standalone client. Or wait for valkey-io#1284.

Copy link
Author

Choose a reason for hiding this comment

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

As discussed, it's better to wait for valkey-io#1284. Will add to PR to ignore GHA failures.

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>
@GumpacG GumpacG merged commit 5c723bc into java/integ_guiang_bitcount May 6, 2024
38 of 43 checks passed
GumpacG added a commit that referenced this pull request May 6, 2024
* Implemented Bitcount command for java client

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>

* Removed unrelated change

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>

* Addressed PR comments

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>

* Addressed PR comments

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>

* Removed unnecessary constructor

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>

---------

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>
@GumpacG GumpacG deleted the java/dev_guiang_bitcount branch May 9, 2024 14:26
GumpacG added a commit that referenced this pull request May 10, 2024
* Implemented Bitcount command for java client

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>

* Removed unrelated change

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>

* Addressed PR comments

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>

* Addressed PR comments

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>

* Removed unnecessary constructor

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>

---------

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>
Yury-Fridlyand pushed a commit that referenced this pull request May 10, 2024
* Java: Add command `BITCOUNT` (#263)

* Implemented Bitcount command for java client

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>

* Removed unrelated change

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>

* Addressed PR comments

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>

* Addressed PR comments

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>

* Removed unnecessary constructor

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>

---------

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>

* Resolved conflicts

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>

* Renamed interface for consistency

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>

* Address PR comments

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>

* Added missed javadoc

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>

* Addressed comments

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>

* Update java/client/src/main/java/glide/api/commands/BitmapBaseCommands.java

Co-authored-by: Aaron <69273634+aaron-congo@users.noreply.github.com>

* Update java/client/src/main/java/glide/api/commands/BitmapBaseCommands.java

Co-authored-by: Aaron <69273634+aaron-congo@users.noreply.github.com>

* addressed PR comments

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>

* Addressed PR comments

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>

* Removed wrong version check

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>

* Rebased and resolved conflicts

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>

---------

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>
Co-authored-by: Aaron <69273634+aaron-congo@users.noreply.github.com>
cyip10 pushed a commit that referenced this pull request Jun 24, 2024
* Java: Add command `BITCOUNT` (#263)

* Implemented Bitcount command for java client

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>

* Removed unrelated change

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>

* Addressed PR comments

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>

* Addressed PR comments

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>

* Removed unnecessary constructor

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>

---------

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>

* Resolved conflicts

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>

* Renamed interface for consistency

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>

* Address PR comments

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>

* Added missed javadoc

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>

* Addressed comments

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>

* Update java/client/src/main/java/glide/api/commands/BitmapBaseCommands.java

Co-authored-by: Aaron <69273634+aaron-congo@users.noreply.github.com>

* Update java/client/src/main/java/glide/api/commands/BitmapBaseCommands.java

Co-authored-by: Aaron <69273634+aaron-congo@users.noreply.github.com>

* addressed PR comments

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>

* Addressed PR comments

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>

* Removed wrong version check

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>

* Rebased and resolved conflicts

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>

---------

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>
Co-authored-by: Aaron <69273634+aaron-congo@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants