Skip to content

test#60836

Open
BiteTheDDDDt wants to merge 1 commit intoapache:masterfrom
BiteTheDDDDt:test_0225
Open

test#60836
BiteTheDDDDt wants to merge 1 commit intoapache:masterfrom
BiteTheDDDDt:test_0225

Conversation

@BiteTheDDDDt
Copy link
Contributor

What problem does this PR solve?

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

Copilot AI review requested due to automatic review settings February 25, 2026 13:15
@hello-stephen
Copy link
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@BiteTheDDDDt
Copy link
Contributor Author

run buildall

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a performance optimization for hash table operations in aggregation operators by implementing batch prefetching with a two-phase approach and removing an unnecessary conditional check for string hash maps.

Changes:

  • Removed conditional is_string_hash_map() check before prefetching, enabling prefetch for all hash map types
  • Added lazy_emplace_batch method with two-phase prefetch optimization for better cache utilization
  • Updated aggregation operators to use batch emplace instead of loop-based single emplace

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
be/src/vec/common/hash_table/hash_map_context.h Added batch emplace method with two-phase prefetching; removed is_string_hash_map() conditionals from prefetch calls
be/src/pipeline/exec/streaming_aggregation_operator.cpp Updated to use lazy_emplace_batch for both limit and non-limit cases
be/src/pipeline/exec/aggregation_source_operator.cpp Updated to use lazy_emplace_batch instead of loop-based emplace
be/src/pipeline/exec/aggregation_sink_operator.cpp Updated to use lazy_emplace_batch for both limit and non-limit cases

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +168 to +171
if (current_row_ref) *current_row_ref = i;
places[i] = *state.lazy_emplace_key(*hash_table, i, keys[i], hash_values[i], creator,
creator_for_null_key);
}
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent code style: line 168 has the conditional and assignment on the same line, while lines 156-158 have them on separate lines. For consistency and readability, please format line 168 the same way as lines 156-158.

Suggested change
if (current_row_ref) *current_row_ref = i;
places[i] = *state.lazy_emplace_key(*hash_table, i, keys[i], hash_values[i], creator,
creator_for_null_key);
}
if (current_row_ref)
*current_row_ref = i;
places[i] = *state.lazy_emplace_key(*hash_table, i, keys[i], hash_values[i], creator,
creator_for_null_key);

Copilot uses AI. Check for mistakes.
@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100.00% (36/36) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 71.35% (26067/36532)
Line Coverage 54.09% (272628/504046)
Region Coverage 51.51% (227055/440788)
Branch Coverage 52.90% (97582/184462)

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100.00% (36/36) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 71.44% (26100/36532)
Line Coverage 54.18% (273092/504046)
Region Coverage 51.63% (227581/440788)
Branch Coverage 53.00% (97765/184462)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants