This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch dev-1.0.0
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git


The following commit(s) were added to refs/heads/dev-1.0.0 by this push:
     new 7a15f28  [fix] Fix error crc32 method to cal uint128 and int128 (#8577)
7a15f28 is described below

commit 7a15f28d7bda66b3e7d000038f36f802b0b0670c
Author: HappenLee <[email protected]>
AuthorDate: Wed Mar 23 10:33:32 2022 +0800

    [fix] Fix error crc32 method to cal uint128 and int128 (#8577)
---
 be/src/vec/common/hash_table/hash.h | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/be/src/vec/common/hash_table/hash.h 
b/be/src/vec/common/hash_table/hash.h
index 5fe9590..3ab335d 100644
--- a/be/src/vec/common/hash_table/hash.h
+++ b/be/src/vec/common/hash_table/hash.h
@@ -108,6 +108,17 @@ inline size_t hash_crc32(T key) {
     return int_hash_crc32(u.out);
 }
 
+template <>
+inline size_t hash_crc32(doris::vectorized::UInt128 u) {
+    return doris::vectorized::UInt128HashCRC32()(u);
+}
+
+template <>
+inline size_t hash_crc32(doris::vectorized::Int128 u) {
+    return doris::vectorized::UInt128HashCRC32()(doris::vectorized::UInt128(
+            (u >> 64) & int64_t (-1), u & int64_t(-1)));
+}
+
 #define DEFINE_HASH(T)                                                \
     template <>                                                       \
     struct HashCRC32<T> {                                             \

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

Reply via email to