Repository navigation
fix: size aggregate spill batches by bytes as well as rows #25853
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+1,336
−35
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
75d66d2
fix: size aggregate spill batches by bytes as well as rows
andygrove d541333
Merge branch 'main' into fix-issue-258521
andygrove 077ff11
fix: bound aggregate spill and replay batches by measured bytes
andygrove c48d462
refactor: simplify aggregate spill batch sizing
andygrove 832a7eb
perf: skip measuring spilled rows when the largest fits the target
andygrove b7cd911
refactor: address review feedback on aggregate spill batch sizing
andygrove ea8d37d
Merge remote-tracking branch 'apache/main' into fix-issue-258521
andygrove 3289c00
fix: compact nested string views of merged batches in aggregate replay
andygrove 9f6c45f
Merge remote-tracking branch 'apache/main' into fix-issue-258521
andygrove 4a3ef10
chore: use the short license header in spilled_row_sizes.rs
andygrove c5cc3af
fix: size and compact dictionary state in aggregate spill batches
andygrove c1f5a64
Merge remote-tracking branch 'apache/main' into pr-25853
andygrove 29c6661
Merge remote-tracking branch 'apache/main' into fix-issue-258521
andygrove 1132fb7
fix: allow with_values on a compacted dictionary in aggregate spill
andygrove File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this an optional setting on just the merge stream? It seems like maybe we would want a
max_batch_bytesas a global config setting, similar tobatchs_size(though it would take quite a bit of effort to thread it through)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only aggregate spilling needs it so far.
batch_sizebounds rows, and a row of aggregate state can hold a whole group, such as anarray_agglist, so the batches that spilling writes and replay merges can be far larger than their row count suggests. A globalmax_batch_byteslikebatch_sizemakes sense to me, but every operator that builds batches would need to estimate row sizes, as this PR does for the two that aggregate spilling uses:IncrementalSortIteratorsizes each row as it is spilled, and the merge uses the average row size of each input batch. I kept the option crate-private so it can become a config later without an API change. It could be part of #26711.