Skip to content

Conversation

@github-actions
Copy link
Contributor

Cherry-picked from #57180

1. alias `xxhash3_64` for `xxhash_64`

2. Support function `murmur_hash3_64_v2`
Before:
```text
mysql> SELECT MURMUR_HASH3_64('1000209601_1756808272');
+------------------------------------------+
| MURMUR_HASH3_64('1000209601_1756808272') |
+------------------------------------------+
|                      1680830166030441144 |
+------------------------------------------+
```
This result differs from the return value of directly calling
mmh3.hash64 in other languages, because external APIs all use mmh3_128
for calculation and then truncate the first 64 bits. The 64-bit version
inside Doris compared to the 128-bit version lacks an h2 register (the
64-bit version only has h1), which will affect the final mixing
calculation of h1 and h2 in the algorithm, leading to issues in the
result.

After support:
```text
mysql> SELECT MURMUR_HASH3_64_V2('1000209601_1756808272');
+---------------------------------------------+
| MURMUR_HASH3_64_V2('1000209601_1756808272') |
+---------------------------------------------+
|                         4038800892574899471 |
+---------------------------------------------+
```

The result now is completely the same as the API call.
@github-actions github-actions bot requested a review from yiguolei as a code owner October 27, 2025 02:54
@Thearas
Copy link
Contributor

Thearas commented Oct 27, 2025

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?

@dataroaring dataroaring reopened this Oct 27, 2025
@Thearas
Copy link
Contributor

Thearas commented Oct 27, 2025

run buildall

@doris-robot
Copy link

ClickBench: Total hot run time: 30.25 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 9dbac5cf2a4d27a586387eb1eb982b0150a80c00, data reload: true

query1	0.03	0.04	0.03
query2	0.11	0.04	0.04
query3	0.26	0.07	0.07
query4	1.66	0.11	0.12
query5	0.26	0.25	0.26
query6	1.19	0.66	0.65
query7	0.02	0.02	0.02
query8	0.07	0.04	0.03
query9	0.60	0.52	0.51
query10	0.56	0.59	0.57
query11	0.16	0.11	0.11
query12	0.15	0.11	0.12
query13	0.63	0.62	0.61
query14	0.80	0.82	0.84
query15	0.88	0.85	0.85
query16	0.39	0.39	0.39
query17	1.03	1.02	1.00
query18	0.19	0.19	0.18
query19	1.93	1.84	1.90
query20	0.02	0.02	0.01
query21	15.42	0.93	0.60
query22	0.76	1.24	0.94
query23	14.91	1.29	0.55
query24	16.26	0.52	0.28
query25	0.26	0.14	0.08
query26	0.37	0.15	0.12
query27	0.06	0.04	0.04
query28	9.25	0.98	0.94
query29	12.66	3.96	3.30
query30	0.28	0.14	0.11
query31	2.87	0.61	0.39
query32	3.27	0.58	0.49
query33	3.03	3.03	3.13
query34	17.14	5.73	5.16
query35	5.12	5.12	5.20
query36	0.70	0.57	0.54
query37	0.10	0.07	0.08
query38	0.06	0.04	0.04
query39	0.04	0.03	0.03
query40	0.17	0.15	0.14
query41	0.08	0.02	0.03
query42	0.04	0.03	0.03
query43	0.05	0.03	0.04
Total cold run time: 113.84 s
Total hot run time: 30.25 s

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Oct 27, 2025
@github-actions
Copy link
Contributor Author

PR approved by at least one committer and no changes requested.

@github-actions
Copy link
Contributor Author

PR approved by anyone and no changes requested.

@yiguolei yiguolei merged commit 7c6592c into branch-4.0 Oct 27, 2025
23 of 26 checks passed
@github-actions github-actions bot deleted the auto-pick-57180-branch-4.0 branch October 27, 2025 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants