This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 57225d69f3 [Fix] add hll param for if function (#12366)
57225d69f3 is described below

commit 57225d69f30858efb808b3635b6348910f233939
Author: shee <13843187+qz...@users.noreply.github.com>
AuthorDate: Thu Nov 10 11:20:58 2022 +0800

    [Fix] add hll param for if function (#12366)
    
    * [Fix] add hll param for if function
    
    * add ut
    
    Co-authored-by: shizhiqiang03 <shizhiqian...@meituan.com>
---
 gensrc/script/doris_builtins_functions.py            |  1 +
 .../conditional_functions/test_if.groovy             | 20 ++++++++++++++++++++
 2 files changed, 21 insertions(+)

diff --git a/gensrc/script/doris_builtins_functions.py 
b/gensrc/script/doris_builtins_functions.py
index 1ed177de77..193fa37b65 100755
--- a/gensrc/script/doris_builtins_functions.py
+++ b/gensrc/script/doris_builtins_functions.py
@@ -1992,6 +1992,7 @@ visible_functions = [
     [['if'], 'DATEV2', ['BOOLEAN', 'DATEV2', 'DATEV2'], '', '', '', 'vec', 
'CUSTOM'],
     [['if'], 'DECIMALV2', ['BOOLEAN', 'DECIMALV2', 'DECIMALV2'], '', '', '', 
'vec', 'CUSTOM'],
     [['if'], 'BITMAP', ['BOOLEAN', 'BITMAP', 'BITMAP'], '', '', '', 'vec', 
'CUSTOM'],
+    [['if'], 'HLL', ['BOOLEAN', 'HLL', 'HLL'], '', '', '', 'vec', 'CUSTOM'],
     # The priority of varchar should be lower than decimal in IS_SUPERTYPE_OF 
mode.
     [['if'], 'VARCHAR', ['BOOLEAN', 'VARCHAR', 'VARCHAR'], '', '', '', 'vec', 
'CUSTOM'],
     [['if'], 'STRING', ['BOOLEAN', 'STRING', 'STRING'], '', '', '', 'vec', 
'CUSTOM'],
diff --git 
a/regression-test/suites/query_p0/sql_functions/conditional_functions/test_if.groovy
 
b/regression-test/suites/query_p0/sql_functions/conditional_functions/test_if.groovy
new file mode 100644
index 0000000000..c546e7891b
--- /dev/null
+++ 
b/regression-test/suites/query_p0/sql_functions/conditional_functions/test_if.groovy
@@ -0,0 +1,20 @@
+// 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_if") {
+    sql "select if(id=1,count,hll_empty()) from (select 1 as id, hll_hash(1) 
as count) t"
+}


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to