-
-
Notifications
You must be signed in to change notification settings - Fork 2k
MDEV-38180: Add xxh32() and xxh3() SQL functions #4741
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
monthdev
wants to merge
6
commits into
MariaDB:main
Choose a base branch
from
monthdev:MDEV-38180
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+228
−0
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
03f71ed
Add XXH32() and XXH3() SQL functions
monthdev c3087e1
Merge branch 'main' into MDEV-38180
monthdev 3f23890
Apply feedback
monthdev d7e1fa2
Apply feedback
monthdev 4ab6933
Fix bug
monthdev 1a4184d
Apply feedback
monthdev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| SELECT XXH32('abc') = '80712ed5' AS xxh32_expected; | ||
| xxh32_expected | ||
| 1 | ||
| SELECT XXH32(11223344) = '1852349e' AS xxh32_num; | ||
| xxh32_num | ||
| 1 | ||
| SELECT XXH32('abc') = XXH32('abc') AS xxh32_eq; | ||
| xxh32_eq | ||
| 1 | ||
| SELECT XXH32(NULL) IS NULL AS xxh32_null; | ||
| xxh32_null | ||
| 1 | ||
| SELECT XXH32('') = '00000000' AS xxh32_empty; | ||
| xxh32_empty | ||
| 1 | ||
| SELECT XXH3('abc') = '244da40f405c870e' AS xxh3_expected; | ||
| xxh3_expected | ||
| 1 | ||
| SELECT XXH3(11223344) = '8178f6e2d84ca479' AS xxh3_num; | ||
| xxh3_num | ||
| 1 | ||
| SELECT XXH3('abc') = XXH32('abc') AS xxh3_eq; | ||
| xxh3_eq | ||
| 0 | ||
| SELECT XXH3(NULL) IS NULL AS xxh3_null; | ||
| xxh3_null | ||
| 1 | ||
| SELECT XXH3('') = '0000000000000000' AS xxh3_empty; | ||
| xxh3_empty | ||
| 1 | ||
| SELECT XXH32(' ') = XXH32(' ') AS xxh32_space_eq; | ||
| xxh32_space_eq | ||
| 1 | ||
| SELECT XXH3(' ') = XXH3(' ') AS xxh3_space_eq; | ||
| xxh3_space_eq | ||
| 1 | ||
| SELECT XXH32(_koi8u 0x20 COLLATE koi8u_general_ci) = | ||
| XXH32(_koi8u 0x60 COLLATE koi8u_general_ci) AS xxh32_koi8u_eq; | ||
| xxh32_koi8u_eq | ||
| 1 | ||
| SELECT XXH3(_koi8u 0x20 COLLATE koi8u_general_ci) = | ||
| XXH3(_koi8u 0x60 COLLATE koi8u_general_ci) AS xxh3_koi8u_eq; | ||
| xxh3_koi8u_eq | ||
| 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| SELECT XXH32('abc') = '80712ed5' AS xxh32_expected; | ||
| SELECT XXH32(11223344) = '1852349e' AS xxh32_num; | ||
| SELECT XXH32('abc') = XXH32('abc') AS xxh32_eq; | ||
| SELECT XXH32(NULL) IS NULL AS xxh32_null; | ||
| SELECT XXH32('') = '00000000' AS xxh32_empty; | ||
|
|
||
| SELECT XXH3('abc') = '244da40f405c870e' AS xxh3_expected; | ||
| SELECT XXH3(11223344) = '8178f6e2d84ca479' AS xxh3_num; | ||
| SELECT XXH3('abc') = XXH32('abc') AS xxh3_eq; | ||
| SELECT XXH3(NULL) IS NULL AS xxh3_null; | ||
| SELECT XXH3('') = '0000000000000000' AS xxh3_empty; | ||
|
|
||
| SELECT XXH32(' ') = XXH32(' ') AS xxh32_space_eq; | ||
| SELECT XXH3(' ') = XXH3(' ') AS xxh3_space_eq; | ||
|
|
||
| SELECT XXH32(_koi8u 0x20 COLLATE koi8u_general_ci) = | ||
| XXH32(_koi8u 0x60 COLLATE koi8u_general_ci) AS xxh32_koi8u_eq; | ||
| SELECT XXH3(_koi8u 0x20 COLLATE koi8u_general_ci) = | ||
| XXH3(_koi8u 0x60 COLLATE koi8u_general_ci) AS xxh3_koi8u_eq; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's something wrong with leading spaces.