[function](hash) add support of murmur_hash3_64 (#12923)
This commit is contained in:
@ -55,6 +55,39 @@ TEST(HashFunctionTest, murmur_hash_3_test) {
|
||||
};
|
||||
}
|
||||
|
||||
TEST(HashFunctionTest, murmur_hash_3_64_test) {
|
||||
std::string func_name = "murmur_hash3_64";
|
||||
|
||||
{
|
||||
InputTypeSet input_types = {TypeIndex::String};
|
||||
|
||||
DataSet data_set = {{{Null()}, Null()},
|
||||
{{std::string("hello")}, (int64_t)-3215607508166160593}};
|
||||
|
||||
check_function<DataTypeInt64, true>(func_name, input_types, data_set);
|
||||
};
|
||||
|
||||
{
|
||||
InputTypeSet input_types = {TypeIndex::String, TypeIndex::String};
|
||||
|
||||
DataSet data_set = {
|
||||
{{std::string("hello"), std::string("world")}, (int64_t)3583109472027628045},
|
||||
{{std::string("hello"), Null()}, Null()}};
|
||||
|
||||
check_function<DataTypeInt64, true>(func_name, input_types, data_set);
|
||||
};
|
||||
|
||||
{
|
||||
InputTypeSet input_types = {TypeIndex::String, TypeIndex::String, TypeIndex::String};
|
||||
|
||||
DataSet data_set = {{{std::string("hello"), std::string("world"), std::string("!")},
|
||||
(int64_t)1887828212617890932},
|
||||
{{std::string("hello"), std::string("world"), Null()}, Null()}};
|
||||
|
||||
check_function<DataTypeInt64, true>(func_name, input_types, data_set);
|
||||
};
|
||||
}
|
||||
|
||||
TEST(HashFunctionTest, murmur_hash_2_test) {
|
||||
std::string func_name = "murmurHash2_64";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user