-
Notifications
You must be signed in to change notification settings - Fork 0
perf: DirectIndexAgg for low-cardinality integer GROUP BY #157
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
Open
poyrazK
wants to merge
21
commits into
main
Choose a base branch
from
perf/group-by-optimization
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.
Open
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
ce1f621
Performance investigation: GROUP BY aggregation fixes
poyrazK d295dc0
Re-implement parallel scan with ThreadPool and steal() method
poyrazK d034935
Add DirectIndexAgg for low-cardinality integer GROUP BY
poyrazK d86ab76
Fix vectorized path activation for GROUP BY with unanalyzed tables
poyrazK 864bbca
style: automated clang-format fixes
poyrazK d63b763
Clean up DirectIndexAgg: remove dead code, mark slot valid in find_or…
poyrazK 0f02154
Add OpenAddressHashAgg class for efficient hash-based aggregation
poyrazK adff7ce
style: automated clang-format fixes
poyrazK 41c0c17
Wire OpenAddressHashAgg into process_input_batch
poyrazK 6e891aa
Fix key_type check in OpenAddressHashAgg::find_or_insert
poyrazK 25d2c5e
Handle string key overflow gracefully with heap allocation
poyrazK 50c2825
style: automated clang-format fixes
poyrazK bb64516
Add produce_output_batch_open_addressing and wire it in
poyrazK 42d60e3
Cleanup: remove dead code from PR #157 review
poyrazK bffd6fb
style: automated clang-format fixes
poyrazK a0afa36
Fix analytics_tests: add nullptr thread_pool arg to VectorizedSeqScan…
poyrazK 712dca2
Fix analytics_tests: add nullptr thread_pool to direct VectorizedSeqS…
poyrazK 8338c9c
Fix g++ build: include thread_pool.hpp in vectorized_operator.hpp
poyrazK a84b0b5
Fix group key type emission in open-addressing output path
poyrazK b2da17c
Fix MIN/MAX aggregates and nullptr thread_pool in vectorized tests
poyrazK ab7e939
style: automated clang-format fixes
poyrazK 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
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
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.
Semantic contract mismatch between documentation and implementation.
The documentation states "After steal(), 'other' is emptied," but the implementations (lines 339-345, 411-417) only swap internal buffers without clearing
other. Aftersteal(), both vectors remain valid with swapped contents rather thanotherbeing empty. This violates the documented contract and could mislead callers who rely onotherbeing emptied.🔄 Proposed fix: clear 'other' after swapping
Update implementations to explicitly clear
otherafter swapping:void steal(ColumnVector&& other) override { auto* other_num = dynamic_cast<NumericVector<T>*>(&other); if (!other_num) throw std::runtime_error("NumericVector::steal: type mismatch"); data_.swap(other_num->data_); null_bitmap_.swap(other_num->null_bitmap_); std::swap(size_, other_num->size_); + other_num->data_.clear(); + other_num->null_bitmap_.clear(); + other_num->size_ = 0; }Apply the same pattern to
StringVector::stealat lines 411-417.🤖 Prompt for AI Agents