From 2ad38e6ab2b802cde0faff397b85fdc081200725 Mon Sep 17 00:00:00 2001 From: zy-kkk <815574403@qq.com> Date: Thu, 2 Jun 2022 14:51:25 +0800 Subject: [PATCH] [regressiontest]add hash function test case (#9918) --- .../hash_functions/test_hash_function.out | 10 ++++++++ .../hash_functions/test_hash_function.groovy | 24 +++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 regression-test/data/query/sql_functions/hash_functions/test_hash_function.out create mode 100644 regression-test/suites/query/sql_functions/hash_functions/test_hash_function.groovy diff --git a/regression-test/data/query/sql_functions/hash_functions/test_hash_function.out b/regression-test/data/query/sql_functions/hash_functions/test_hash_function.out new file mode 100644 index 0000000000..808e819341 --- /dev/null +++ b/regression-test/data/query/sql_functions/hash_functions/test_hash_function.out @@ -0,0 +1,10 @@ +-- This file is automatically generated. You should know what you did if you want to edit this +-- !sql -- +\N + +-- !sql -- +1321743225 + +-- !sql -- +984713481 + diff --git a/regression-test/suites/query/sql_functions/hash_functions/test_hash_function.groovy b/regression-test/suites/query/sql_functions/hash_functions/test_hash_function.groovy new file mode 100644 index 0000000000..1509f0a791 --- /dev/null +++ b/regression-test/suites/query/sql_functions/hash_functions/test_hash_function.groovy @@ -0,0 +1,24 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +suite("test_hash_function", "query") { + sql "set enable_vectorized_engine = true;" + sql "set batch_size = 4096;" + + qt_sql "SELECT murmur_hash3_32(null);" + qt_sql "SELECT murmur_hash3_32(\"hello\");" + qt_sql "SELECT murmur_hash3_32(\"hello\", \"world\");" +}