Fix segment metadata query inconsistency bug with HLLSketch columns#18879
Merged
jtuglu1 merged 3 commits intoapache:masterfrom Jan 5, 2026
Merged
Fix segment metadata query inconsistency bug with HLLSketch columns#18879jtuglu1 merged 3 commits intoapache:masterfrom
jtuglu1 merged 3 commits intoapache:masterfrom
Conversation
0a5bebf to
fa82391
Compare
fa82391 to
7ae979b
Compare
abhishekrb19
reviewed
Jan 2, 2026
Contributor
abhishekrb19
left a comment
There was a problem hiding this comment.
Thanks for the fix, looks good to me. I had a question about whether this also applies more generally in cases where we have different aggregators for the build vs output types (not just HLLSketch columns).
processing/src/main/java/org/apache/druid/segment/incremental/IncrementalIndex.java
Show resolved
Hide resolved
.../apache/druid/query/aggregation/datasketches/hll/HllSketchBuildSegmentMetadataQueryTest.java
Outdated
Show resolved
Hide resolved
.../apache/druid/query/aggregation/datasketches/hll/HllSketchBuildSegmentMetadataQueryTest.java
Outdated
Show resolved
Hide resolved
.../apache/druid/query/aggregation/datasketches/hll/HllSketchBuildSegmentMetadataQueryTest.java
Outdated
Show resolved
Hide resolved
.../apache/druid/query/aggregation/datasketches/hll/HllSketchBuildSegmentMetadataQueryTest.java
Outdated
Show resolved
Hide resolved
abhishekrb19
approved these changes
Jan 5, 2026
Contributor
abhishekrb19
left a comment
There was a problem hiding this comment.
Thanks! Could you also add a note to the release notes mentioning that this fix applies to other sketch aggregators as well?
...org/apache/druid/query/aggregation/datasketches/BaseSketchBuildSegmentMetadataQueryTest.java
Show resolved
Hide resolved
63e3737 to
9653a8a
Compare
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 #14315.
Description
As outlined in #14315, segment metadata queries issued against complex columns served by realtime data nodes (
IncrementalIndex) can potentially clash with type names of the same column (inQueryableIndex) served by historical nodes. I thought the best way to solve this was ensuring that the column type used is consistent across both data serving nodes (e.g. realtime and historical), rather than attempting to do some case-by-case coverage. Keeping as draft until I can confirm this doesn't break any other codepaths.Release note
Fix segment metadata query type inconsistency bug when querying between realtime and historical sketch columns.
This PR has: