Skip to content

[server] Add KLL double sketch aggregation merge function - #5121

Draft
rahulbsw wants to merge 13 commits into
apache:mainfrom
rahulbsw:kll-double-sketch-merge-engine
Draft

rahulbsw wants to merge 13 commits into
apache:mainfrom
rahulbsw:kll-double-sketch-merge-engine

Conversation

@rahulbsw

@rahulbsw rahulbsw commented Nov 9, 2026

Copy link
Copy Markdown

Summary

Add kll_double_sketch aggregation for BYTES columns. Rows with the same primary key merge serialized Apache DataSketches KLL doubles sketches, preserving a distribution that clients can query for approximate percentiles.

Registers the aggregation metadata and server factory, tests sketch merging, null inputs, invalid payloads and Flink option parsing, and documents serialized-sketch insert semantics and Spark HLL examples. Raw DOUBLE inputs still require sketch construction by the writer; SQL helper functions are separate work.

Part of #3331. Depends on #3337 for the DataSketches dependency and HLL foundation. This draft includes those commits until #3337 merges. The KLL implementation is commit e712d83; compare against the hll-sketch-aggregation branch for the KLL-only diff.

Test Plan

  • git diff origin/main...HEAD --check passes.
  • Focused Maven verification passes for TableDescriptorTest, FieldAggregatorParameterizedTest, and FlinkAggFunctionParserTest, including Checkstyle, Spotless, and license checks: mvn -B -pl fluss-common,fluss-server,fluss-flink/fluss-flink-common -am -Dtest=TableDescriptorTest,FieldAggregatorParameterizedTest,FlinkAggFunctionParserTest -Dsurefire.failIfNoSpecifiedTests=false test (JDK 17).

AI-assisted changes; pending human review.

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.

1 participant