MSQ window functions: Fix boost column not being written to the frame in window stage #17141
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.
Description
In
WindowOperatorQueryFrameProcessor
, currently we were not adding the partition boost column to theColumnSelectorFactory
used to create theFrameWriter
. Because of this, the boost column was not being written to the frame.This was causing the quantile sketch to misjudge the number of output partitions to create, as it was creating a single partition boundary because we had the same value for boost column (null byte) across all rows.
For example, for the following query with
maxNumTasks=5
:Currently, we were getting 1 worker in the Scan stage after the Window stage:
With this PR's change, we get multiple workers in the Scan stage after the Window stage:
Test changes of the PR
order by
to try and make the output deterministically correct for queries of these tests, but since these were tests from the drill suite, I thought it's best to leave them untouched and just use a single worker for these.testWindowOnMixOfEmptyAndNonEmptyOverWithMultipleWorkers
reflects the above situation where previously we were getting 1 worker in the stage after the Window stage, but now we're getting 4 workers (as we usemaxNumTasks=5
in this particular test).This PR has: