You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2022/04/15 07:17:17 UTC

[incubator-doris] branch master updated: [fix] change parameter type of hll_cardinality from STRING to HLL (#9002)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new a2d6724fa7 [fix] change parameter type of hll_cardinality from STRING to HLL (#9002)
a2d6724fa7 is described below

commit a2d6724fa731e348c04453d103a47d0ecdf2e73a
Author: Mingyu Chen <mo...@gmail.com>
AuthorDate: Fri Apr 15 15:17:11 2022 +0800

    [fix] change parameter type of hll_cardinality from STRING to HLL (#9002)
    
    In #8882, we disabled the conversion from string to hll. So we need to change the parameter type of hll_cardinality() too
---
 gensrc/script/doris_builtins_functions.py                        | 5 +----
 regression-test/data/types/complex_types/basic_agg_test.out      | 5 +++++
 regression-test/suites/types/complex_types/basic_agg_test.groovy | 4 +++-
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/gensrc/script/doris_builtins_functions.py b/gensrc/script/doris_builtins_functions.py
index d8d027b521..6dea5780a2 100755
--- a/gensrc/script/doris_builtins_functions.py
+++ b/gensrc/script/doris_builtins_functions.py
@@ -1175,7 +1175,7 @@ visible_functions = [
             '', '', 'vec', ''],
 
     #hll function
-    [['hll_cardinality'], 'BIGINT', ['VARCHAR'],
+    [['hll_cardinality'], 'BIGINT', ['HLL'],
         '_ZN5doris12HllFunctions15hll_cardinalityEPN9doris_udf15FunctionContextERKNS1_9StringValE',
         '', '', 'vec', 'ALWAYS_NOT_NULLABLE'],
     [['hll_hash'], 'HLL', ['VARCHAR'],
@@ -1184,9 +1184,6 @@ visible_functions = [
     [['hll_empty'], 'HLL', [],
         '_ZN5doris12HllFunctions9hll_emptyEPN9doris_udf15FunctionContextE',
         '', '', 'vec', 'ALWAYS_NOT_NULLABLE'],
-    [['hll_cardinality'], 'BIGINT', ['STRING'],
-        '_ZN5doris12HllFunctions15hll_cardinalityEPN9doris_udf15FunctionContextERKNS1_9StringValE',
-        '', '', 'vec', 'ALWAYS_NOT_NULLABLE'],
     [['hll_hash'], 'HLL', ['STRING'],
         '_ZN5doris12HllFunctions8hll_hashEPN9doris_udf15FunctionContextERKNS1_9StringValE',
         '', '', 'vec', 'ALWAYS_NOT_NULLABLE'],
diff --git a/regression-test/data/types/complex_types/basic_agg_test.out b/regression-test/data/types/complex_types/basic_agg_test.out
index 057cc0032f..767a1dc038 100644
--- a/regression-test/data/types/complex_types/basic_agg_test.out
+++ b/regression-test/data/types/complex_types/basic_agg_test.out
@@ -9,3 +9,8 @@
 2	\N
 3	\N
 
+-- !sql_hll_cardinality --
+1	0
+2	1
+3	2
+
diff --git a/regression-test/suites/types/complex_types/basic_agg_test.groovy b/regression-test/suites/types/complex_types/basic_agg_test.groovy
index c7528246e7..6314f76dab 100644
--- a/regression-test/suites/types/complex_types/basic_agg_test.groovy
+++ b/regression-test/suites/types/complex_types/basic_agg_test.groovy
@@ -27,4 +27,6 @@ suite("basic_agg_test") {
     qt_sql_bitmap """select * from bitmap_basic_agg;"""
 
     qt_sql_hll """select * from hll_basic_agg;"""
-}
\ No newline at end of file
+
+    qt_sql_hll_cardinality """select k1, hll_cardinality(hll_union(k2)) from hll_basic_agg group by k1 order by k1;"""
+}


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