linrrzqqq opened a new pull request, #57180:
URL: https://github.com/apache/doris/pull/57180

   ### What problem does this PR solve?
   
   Issue Number: close #xxx
   
   Related PR: #xxx
   
   Problem Summary:
   
   ### Release note
   
   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.
   
   ### Check List (For Author)
   
   - Test <!-- At least one of them must be included. -->
       - [x] 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 <!-- Add your reason?  -->
   
   - Behavior changed:
       - [x] No.
       - [ ] Yes. <!-- Explain the behavior change -->
   
   - Does this need documentation?
       - [ ] No.
       - [x] Yes. https://github.com/apache/doris-website/pull/2993
   
   ### Check List (For Reviewer who merge this PR)
   
   - [ ] Confirm the release note
   - [ ] Confirm test cases
   - [ ] Confirm document
   - [ ] Add branch pick label <!-- Add branch pick label that this PR should 
merge into -->
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to