[BugFix] Fix sequence of selection and input_chunk for streaming_agg_with_selection (backport #54595) #54619
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.
Why I'm doing:
Previous Logic:
evaluate_group_by_columns
.evaluate_input_columns
_streaming_selection
to indicate which rows hit HT.output_chunk_by_streaming_with_selection
(filtergroup_by_columns
andinput_columns
by_streaming_selection
)output_chunk_by_streaming
Recent Logic:
evaluate_group_by_columns
_streaming_selection
to indicate which rows hit HT.output_chunk_by_streaming_with_selection
(filtergroup_by_columns
by_streaming_selection
)output_chunk_by_streaming
(evaluateinput_columns
here now)This cause two issues.
In
output_chunk_by_streaming
, before callingevaluate_input_columns
, the number of rows ingroup_by_columns
andinput_chunk
differs. This is becausegroup_by_columns
is filtered by_streaming_selection
, whereasinput_chunk
is not.The result of
evaluate_input_columns
is not filtered by_streaming_selection
.What I'm doing:
Fixes https://github.com/StarRocks/StarRocksTest/issues/9009
What type of PR is this:
Does this PR entail a change in behavior?
If yes, please specify the type of change:
Checklist: