This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch dev-1.0.1 in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
commit 5a45897cb8a92717eb75d3ca087050356a52c644 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]
