Skip to content

Feature/t digest - #3823

Merged
a-TODO-rov merged 17 commits into
redis:mainfrom
Dgramada:feature/t-digest
Aug 13, 2026
Merged

a-TODO-rov merged 17 commits into
redis:mainfrom
Dgramada:feature/t-digest

Conversation

@Dgramada

@Dgramada Dgramada commented Jul 7, 2026 •

Copy link
Copy Markdown
Contributor

Adds support for Redis T-Digest Sketch commands.

Commands:


  • You have read the contribution guidelines.
  • You have created a feature request first to discuss your contribution intent. Please reference the feature request ticket number in the pull request.
  • You applied code formatting rules using the mvn formatter:format target. Don’t submit any formatting related changes.
  • You submit test cases (unit or integration tests) that back your changes.

Note

Low Risk
Additive API and protocol support with no changes to auth or core connection logic; risk is mainly breadth of new surface area and correct RESP decoding for special doubles.

Overview
Adds full client support for Redis T-Digest (TDIGEST.*) across sync, async, reactive, Kotlin coroutines, and cluster node-selection APIs, following the same layout as other probabilistic modules (CMS, Top-K).

New pieces include RedisTDigestCommandBuilder, TDigestInfoValue / parser, TDigestMergeArgs (COMPRESSION, OVERRIDE), protocol entries in CommandType and read-only routing, plus integration and unit tests.

Supporting tweaks: DoubleOutput / DoubleListOutput now decode bulk-string doubles via LettuceStrings.toDouble (so Redis nan / inf work); LettuceAssert gains notEmpty for long[] and double[]. Top-K test classes were moved from probabilistic.topk to probabilistic (package-only).

Reviewed by Cursor Bugbot for commit e505878. Bugbot is set up for automated code reviews on this repo. Configure here.

Dgramada and others added 7 commits July 6, 2026 17:48
Signed-off-by: yordantsintsov <yordan.tsintsov@gmail.com>
Signed-off-by: yordantsintsov <yordan.tsintsov@gmail.com>
# Conflicts:
#	src/test/java/io/lettuce/core/cluster/ClusterReadOnlyCommandsUnitTests.java
Signed-off-by: yordantsintsov <yordan.tsintsov@gmail.com>
# Conflicts:
#	src/main/java/io/lettuce/core/protocol/CommandKeyword.java
#	src/main/kotlin/io/lettuce/core/api/coroutines/RedisCoroutinesCommands.kt
#	src/test/java/io/lettuce/apigenerator/Constants.java
#	src/test/java/io/lettuce/core/cluster/ClusterReadOnlyCommandsUnitTests.java
Signed-off-by: yordantsintsov <yordan.tsintsov@gmail.com>
Signed-off-by: yordantsintsov <yordan.tsintsov@gmail.com>
Signed-off-by: yordantsintsov <yordan.tsintsov@gmail.com>
Signed-off-by: yordantsintsov <yordan.tsintsov@gmail.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

Reviewed by Cursor Bugbot for commit c506cab. Configure here.

Signed-off-by: yordantsintsov <yordan.tsintsov@gmail.com>
Signed-off-by: yordantsintsov <yordan.tsintsov@gmail.com>
…lueParserUnitTests.

Signed-off-by: yordantsintsov <yordan.tsintsov@gmail.com>
Signed-off-by: yordantsintsov <yordan.tsintsov@gmail.com>
# Conflicts:
#	src/main/java/io/lettuce/core/AbstractRedisAsyncCommands.java
#	src/main/java/io/lettuce/core/AbstractRedisReactiveCommands.java
#	src/main/java/io/lettuce/core/api/async/RedisAsyncCommands.java
#	src/main/java/io/lettuce/core/api/reactive/RedisReactiveCommands.java
#	src/main/java/io/lettuce/core/api/sync/RedisCommands.java
#	src/main/java/io/lettuce/core/cluster/api/async/NodeSelectionAsyncCommands.java
#	src/main/java/io/lettuce/core/cluster/api/async/RedisClusterAsyncCommands.java
#	src/main/java/io/lettuce/core/cluster/api/reactive/RedisClusterReactiveCommands.java
#	src/main/java/io/lettuce/core/cluster/api/sync/NodeSelectionCommands.java
#	src/main/java/io/lettuce/core/cluster/api/sync/RedisClusterCommands.java
#	src/main/java/io/lettuce/core/protocol/CommandType.java
#	src/main/java/io/lettuce/core/protocol/ReadOnlyCommands.java
#	src/main/kotlin/io/lettuce/core/api/coroutines/RedisCoroutinesCommands.kt
#	src/main/kotlin/io/lettuce/core/api/coroutines/RedisCoroutinesCommandsImpl.kt
#	src/main/kotlin/io/lettuce/core/cluster/api/coroutines/RedisClusterCoroutinesCommands.kt
#	src/main/kotlin/io/lettuce/core/cluster/api/coroutines/RedisClusterCoroutinesCommandsImpl.kt
#	src/test/java/io/lettuce/core/cluster/ClusterReadOnlyCommandsUnitTests.java
Signed-off-by: yordantsintsov <yordan.tsintsov@gmail.com>

@a-TODO-rov a-TODO-rov left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

super(codec);
}

Command<K, V, String> tdigestAdd(K key, V value) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Command<K, V, String> tdigestAdd(K key, V value) {
Command<K, V, String> tdigestAdd(K key, double value) {

}

@SafeVarargs
final Command<K, V, String> tdigestAdd(K key, V... values) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
final Command<K, V, String> tdigestAdd(K key, V... values) {
final Command<K, V, String> tdigestAdd(K key, double... values) {

@a-TODO-rov
a-TODO-rov merged commit c8b7756 into redis:main Aug 13, 2026
9 of 10 checks passed
@Dgramada
Dgramada deleted the feature/t-digest branch August 13, 2026 15:12
@Dgramada Dgramada linked an issue Aug 13, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants

⌂ 换网址