Skip to content

fix: GroupByFrameCombiner selectors must track cursor changes.#19238

Merged
gianm merged 2 commits intoapache:masterfrom
gianm:fix-msq-groupby-combiner
Mar 31, 2026
Merged

fix: GroupByFrameCombiner selectors must track cursor changes.#19238
gianm merged 2 commits intoapache:masterfrom
gianm:fix-msq-groupby-combiner

Conversation

@gianm
Copy link
Copy Markdown
Contributor

@gianm gianm commented Mar 31, 2026

The groupBy combiner introduced in #19193 created selectors incorrectly: they tracked a single underlying cursor rather than following changes in the cursor. This patch addresses it by adding indirection through TrackingDimensionSelector and TrackingColumnValueSelector.

@github-actions github-actions bot added Area - Batch Ingestion Area - MSQ For multi stage queries - https://github.com/apache/druid/issues/12262 labels Mar 31, 2026
@gianm gianm force-pushed the fix-msq-groupby-combiner branch from 45d3649 to 7e73533 Compare March 31, 2026 04:58
}
final int columnNumber = signature.indexOf(dimensionSpec.getDimension());
if (columnNumber < 0) {
return DimensionSelector.constant(null, dimensionSpec.getExtractionFn());

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation Note test

Invoking
DimensionSpec.getExtractionFn
should be avoided because it has been deprecated.
The groupBy combiner introduced in apache#19193 created selectors incorrectly:
they tracked a single underlying cursor rather than following changes
in the cursor. This patch addresses it by adding indirection through
TrackingDimensionSelector and TrackingColumnValueSelector.
@gianm gianm force-pushed the fix-msq-groupby-combiner branch from 7e73533 to 5b03634 Compare March 31, 2026 05:25
@gianm gianm merged commit 67de7d1 into apache:master Mar 31, 2026
63 of 64 checks passed
@github-actions github-actions bot added this to the 37.0.0 milestone Mar 31, 2026
@gianm gianm deleted the fix-msq-groupby-combiner branch March 31, 2026 20:20
gianm added a commit to gianm/druid that referenced this pull request Mar 31, 2026
Follow-ups to apache#19238:

1) Remove a stale comment in GroupByFrameCombinerTest.

2) Make TrackingColumnValueSelector.classOfObject() call its delegate,
   just like TrackingDimensionSelector does. This likely doesn't matter
   with how the class is actually used, but it's nice to be consistent.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area - Batch Ingestion Area - MSQ For multi stage queries - https://github.com/apache/druid/issues/12262

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants