opt for StringHashTable's for_each#60941
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
There was a problem hiding this comment.
Pull request overview
This PR introduces batch-oriented helpers to speed up StringHashMap operations by grouping rows by StringHashTable sub-map (m0/m1/m2/m3/m4/ms) and then processing each sub-map in a tight loop, avoiding per-row dispatch branching.
Changes:
- Expose StringHashTable sub-maps via
visit_submaps()(and direct accessors) to enable sub-map batch processing. - Add
StringKeySubTableGroupsplus new batch helpers (lazy_emplace_batch,lazy_emplace_batch_void,find_batch) to process StringHashMap rows grouped by sub-table. - Switch several aggregation pipeline operators to use the new batch helpers for emplace/find.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| be/src/vec/common/hash_table/string_hash_table.h | Adds visit_submaps() and sub-map accessors to iterate over StringHashTable sub-tables. |
| be/src/vec/common/hash_table/hash_map_context.h | Adds string sub-table grouping and new batch emplace/find helpers; adjusts prefetch behavior. |
| be/src/pipeline/rec_cte_shared_state.h | Replaces per-row emplace loop with lazy_emplace_batch_void. |
| be/src/pipeline/exec/streaming_aggregation_operator.cpp | Replaces per-row emplace loops with lazy_emplace_batch (and limit path). |
| be/src/pipeline/exec/distinct_streaming_aggregation_operator.cpp | Replaces per-row emplace loop with lazy_emplace_batch_void. |
| be/src/pipeline/exec/aggregation_source_operator.cpp | Replaces per-row emplace loop with lazy_emplace_batch. |
| be/src/pipeline/exec/aggregation_sink_operator.cpp | Replaces per-row emplace loops with lazy_emplace_batch and per-row find loop with find_batch. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
run buildall |
1 similar comment
|
run buildall |
update update
|
run buildall |
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
|
run buildall |
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
2 similar comments
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
1 similar comment
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)