diff options
author | ivanmorozov <ivanmorozov@yandex-team.com> | 2023-11-20 15:09:31 +0300 |
---|---|---|
committer | ivanmorozov <ivanmorozov@yandex-team.com> | 2023-11-20 18:56:49 +0300 |
commit | 73b8ff93078e1e162ff89c759ca9c47f5ef63ad4 (patch) | |
tree | 748d40a9319399967d2574a2987d99fd12a534d5 | |
parent | b567c8e4d80f63a6e6c57b7a0d9c31284f7cfe52 (diff) | |
download | ydb-73b8ff93078e1e162ff89c759ca9c47f5ef63ad4.tar.gz |
use xx64 hash
-rw-r--r-- | ydb/core/formats/arrow/permutations.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/ydb/core/formats/arrow/permutations.cpp b/ydb/core/formats/arrow/permutations.cpp index ce92ca26c7..173193eec3 100644 --- a/ydb/core/formats/arrow/permutations.cpp +++ b/ydb/core/formats/arrow/permutations.cpp @@ -2,11 +2,15 @@ #include "permutations.h" #include "replace_key.h" #include "size_calcer.h" + #include <ydb/core/formats/arrow/common/validation.h> -#include <contrib/libs/apache/arrow/cpp/src/arrow/array/builder_primitive.h> #include <ydb/library/services/services.pb.h> + #include <library/cpp/actors/core/log.h> +#include <contrib/libs/apache/arrow/cpp/src/arrow/array/builder_primitive.h> +#include <contrib/libs/xxhash/xxhash.h> + namespace NKikimr::NArrow { std::shared_ptr<arrow::UInt64Array> MakePermutation(const int size, const bool reverse) { @@ -252,17 +256,17 @@ size_t THashConstructor::TypedHash(const arrow::Array& ar, const int pos) { case arrow::Type::STRING: { const auto& str = static_cast<const arrow::StringArray&>(ar).GetView(pos); - return CityHash64(str.data(), str.size()); + return XXH64(str.data(), str.size(), 0); } case arrow::Type::BINARY: { const auto& str = static_cast<const arrow::BinaryArray&>(ar).GetView(pos); - return CityHash64(str.data(), str.size()); + return XXH64(str.data(), str.size(), 0); } case arrow::Type::FIXED_SIZE_BINARY: { const auto& str = static_cast<const arrow::FixedSizeBinaryArray&>(ar).GetView(pos); - return CityHash64(str.data(), str.size()); + return XXH64(str.data(), str.size(), 0); } case arrow::Type::TIMESTAMP: return THash<i64>()(static_cast<const arrow::TimestampArray&>(ar).Value(pos)); |