-
Notifications
You must be signed in to change notification settings - Fork 2k
Intermediate result blocked approach to aggregation memory management #15591
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
Draft
Rachelint
wants to merge
74
commits into
apache:main
Choose a base branch
from
Rachelint:intermeidate-result-blocked-approach
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
74 commits
Select commit
Hold shift + click to select a range
4353748
define the needed methods in `GroupAccumulator` and `GroupValues`.
Rachelint a4450f7
define `GroupIndexOperations`, and impl block/flat mode for it.
Rachelint 96b7435
support block approach for `GroupValuesPrimitive`.
Rachelint 38d4fc6
add new emit mode.
Rachelint 72e0fc3
make `NullState` codes common for better reuse.
Rachelint 2dba944
improve comments.
Rachelint c08f23a
remove stale codes.
Rachelint f6f3bd6
add tests.
Rachelint 53e8c8e
support dynamic dispatching for `NullState`.
Rachelint b5d231e
improve tests to cover `BlockedNullState`.
Rachelint a644b17
complete the impl of blocked `GroupValuesPrimitive`.
Rachelint 67f03fc
support blocked mode for `GroupValuesPrimitive`.
Rachelint d165fb0
make `EmitTo::NextBlock` simpler.
Rachelint 319e135
extract the common codes of block for reusing.
Rachelint 808f142
support blocked mode for `PrimitiveGroupsAccumulator`.
Rachelint 489f093
impl block based result returning logic.
Rachelint 54002a1
add judgement about when we should enable blocked groups optimization.
Rachelint 1f7b4bc
add config to control if we enable blocked groups optimization.
Rachelint e58afa5
fix e2e sql tests.
Rachelint 4294ab7
fix group values len method.
Rachelint 79714a4
add `memory_limit` to expose the info in `MemoryPool`.
Rachelint 266b48e
modify the spilling judgement.
Rachelint 55de98c
add unit tests for primitive group values.
Rachelint 9145833
improve comments for `GroupIndexOperations`.
Rachelint 04f15b0
add `enable_aggregation_blocked_groups` to aggr fuzzy test.
Rachelint be64a74
refactor and make `QueryBuilder` more configurable.
Rachelint 7da0259
fix tests.
Rachelint d771038
Merge branch 'main' into intermeidate-result-blocked-approach
Rachelint ffb11cd
fix clippy.
Rachelint 7f543d8
add fuzzy tests for blocked groups, and fix enable logic.
Rachelint 868210f
update config.md and fix clippy.
Rachelint bdcd1b8
improve comment about blocked groups for `GroupedHashAggregateStream`.
Rachelint 3c7317d
fix stack overflow.
Rachelint ff9c3ad
add extended query to see the improvement.
Rachelint 96b3c77
Merge branch 'main' into intermeidate-result-blocked-approach
Rachelint 3e23408
Merge branch 'main' into intermeidate-result-blocked-approach
Rachelint bb63628
Update datafusion/common/src/config.rs
Rachelint a7c4c7b
update config.
Rachelint e033567
fix fmt.
Rachelint d173056
fix logic test.
Rachelint 29222e1
Merge branch 'main' into intermeidate-result-blocked-approach
Rachelint 426e2ee
improve comments.
Rachelint 948c4ce
move group index operations to a new module.
Rachelint 09b97ab
define `Blocks` and use it to refactor.
Rachelint cee016c
extract blocks to a dedicated module.
Rachelint 75ee3f3
add tests for `Blocks`.
Rachelint 5a6e030
simplify codes about blocks.
Rachelint 4c6799f
fix ci.
Rachelint 93e5f9d
Merge branch 'main' into intermeidate-result-blocked-approach
Rachelint 7542b49
return error when found blocked approach not supported.
Rachelint a0e467f
Merge branch 'main' into intermeidate-result-blocked-approach
53b8fa0
fix compile.
78eec5a
fix compile.
aa808d6
finish refactor of group_values_primitive.
f95384d
fix error macro.
6bda26e
fix NullState accumulate tests for blocked groups.
44ca669
allow accs empty, and add some necessary asserts.
6be311c
refactor: separate blocked groups eligibility check from side effects
8fae9fa
refactor: add SessionContextOptions for fuzz test config overrides
0e43431
docs: explain how test_blocked_groups_optimization forces the blocked…
056faaf
Merge branch 'main' into intermeidate-result-blocked-approach
Rachelint 0840671
fix: resolve compilation errors after merging main
Rachelint 62483d4
fix: correct collect_statistics default in information_schema test
Rachelint 7acfa7c
Merge branch 'main' into intermeidate-result-blocked-approach
Rachelint e7fa863
fix: increase memory limits in spill tests for blocked groups
Rachelint b377457
fix: split spill tests into flat/blocked variants
Rachelint fd2efd3
fix: avoid over-allocation in flat mode PrimitiveGroupsAccumulator
Rachelint fa0e639
fix: resolve clippy warnings in row_hash.rs
Rachelint 46ec4b4
fix: resolve cargo fmt, clippy, and config docs issues
Rachelint cd51337
fix: correct stale doc link to maybe_enable_blocked_groups
Rachelint 14e6cf2
refactor: organize aggregate tests and cover both flat/blocked modes
Rachelint 0069086
rename things in blocks.rs to improve readable.
Rachelint 8d05217
refactor: replace VecDeque with Vec + start offset in Blocks
Rachelint a68716b
rename `len` to `num_blocks`.
Rachelint 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
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.
It should be false by default for now?