#include "FunctionsConsistentHashing.h" #include #include namespace DB { struct SumburConsistentHashImpl { static constexpr auto name = "sumburConsistentHash"; using HashType = UInt32; using ResultType = UInt16; using BucketsType = ResultType; static constexpr auto max_buckets = static_cast(std::numeric_limits::max()); static inline ResultType apply(HashType hash, BucketsType n) { return static_cast(sumburConsistentHash(hash, n)); } }; using FunctionSumburConsistentHash = FunctionConsistentHashImpl; void registerFunctionSumburConsistentHash(FunctionFactory & factory) { factory.registerFunction(); } }