Repository navigation
fix: Avoid duplicate aggregators when reusing T-Digest sketches - #20837
Merged
FrankChen021 merged 1 commit intoNov 5, 2026
Merged
Conversation
FrankChen021
reviewed
Nov 4, 2026
FrankChen021
left a comment
Member
There was a problem hiding this comment.
🟢 Approval recommended
No actionable issues found in this review. The reuse path correctly references the existing T-Digest aggregator through a field-access post-aggregator, and the regression test covers quantile-first planning and serialized sketch output.
Reviewed 2 of 2 changed files.
Validation: git diff --check passed; tests and builds were not run during this static review.
This is an automated review by Codex GPT-5.6-Luna(max)
FrankChen021
approved these changes
Nov 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #20819
Description
Return a
FieldAccessPostAggregatorwhenTDIGEST_GENERATE_SKETCHreuses an existing sketch, so selectingTDIGEST_QUANTILEfirst no longer registers the same aggregator twiceAdd a SQL regression that checks the quantile and serialized sketch results and verifies that both outputs share one native sketch aggregator
Release note
Fixed SQL planning failures when
TDIGEST_GENERATE_SKETCHfollowsTDIGEST_QUANTILEwith the same input and compressionValidation
Tested with Temurin 25.0.5 and Maven 3.9.11
Duplicate field name: a0:aggand passes after the fixmvn -B -ntp test -pl extensions-contrib/tdigestsketch -Dsurefire.rerunFailingTestsCount=0 -Pskip-static-checks -Dweb.console.skip=true: 57 tests passed, no failures or skipsmvn -B -ntp verify -pl extensions-contrib/tdigestsketch -DskipTests -Dweb.console.skip=true -Dmaven.javadoc.skip=true -Dcyclonedx.skip=true: passed with static checks enabledmvn -B -ntp -pl extensions-contrib/tdigestsketch -Prat apache-rat:check dependency:analyze-only spotbugs:check -DoutputXML=true -DignoreNonCompile=true -DfailOnWarning=true: passedjavap -publicconfirms unchanged public signatures forTDigestGenerateSketchSqlAggregatorThis PR has: