Skip to content

Conversation

@before-Sunrise
Copy link
Contributor

Why I'm doing:

fnv hash is much slower then crc hash.

What I'm doing:

use crc hash when sv is set. So upgrade is safe

What type of PR is this:

  • BugFix
  • Feature
  • Enhancement
  • Refactor
  • UT
  • Doc
  • Tool

Does this PR entail a change in behavior?

  • Yes, this PR will result in a change in behavior.
  • No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

  • Interface/UI changes: syntax, type conversion, expression evaluation, display information
  • Parameter changes: default values, similar parameters but with different default values
  • Policy changes: use new policy to replace old one, functionality automatically enabled
  • Feature removed
  • Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr needs user documentation (for new or modified features or behaviors)
    • I have added documentation for my new feature or new function
  • This is a backport pr

Bugfix cherry-pick branch check:

  • I have checked the version labels which the pr will be auto-backported to the target branch
    • 4.0
    • 3.5
    • 3.4
    • 3.3

Signed-off-by: before-Sunrise <[email protected]>
Signed-off-by: before-Sunrise <[email protected]>
Signed-off-by: before-Sunrise <[email protected]>
@before-Sunrise before-Sunrise requested a review from a team as a code owner September 30, 2025 05:50
@github-actions github-actions bot added the 4.0 label Sep 30, 2025
@wanpengfei-git wanpengfei-git requested a review from a team September 30, 2025 05:51
@sonarqubecloud
Copy link

Copy link
Contributor

@alvin-celerdata alvin-celerdata left a comment

Choose a reason for hiding this comment

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

I put a request changes first before the concerns are resolved.

_hash_values.assign(num_rows, HashUtil::FNV_SEED);
for (const ColumnPtr& column : _partitions_columns) {
column->fnv_hash(&_hash_values[0], 0, num_rows);
// Check if we should use crc32_hash instead of fnv_hash based on session variable
Copy link
Contributor

Choose a reason for hiding this comment

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

What hash function does starrocks use for aggregation.
The hash functions of aggregation and shuffle should be different, otherwise, it will cause a lot of hash conflicts in aggregation or hash-join. It will cause a much bigger hash table than it should be.
So when you change it, you must make sure that they are using two different functions.

@github-actions
Copy link

[Java-Extensions Incremental Coverage Report]

pass : 0 / 0 (0%)

@github-actions
Copy link

[BE Incremental Coverage Report]

fail : 0 / 5 (00.00%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 src/exec/pipeline/exchange/exchange_sink_operator.cpp 0 5 00.00% [587, 588, 591, 592, 593]

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants