You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2023/04/27 01:33:07 UTC

[doris] branch branch-1.2-lts updated: [fix](fe)hll_raw_agg function's return type should be always not nullable (#19128)

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

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


The following commit(s) were added to refs/heads/branch-1.2-lts by this push:
     new d69c055cbc [fix](fe)hll_raw_agg function's return type should be always not nullable (#19128)
d69c055cbc is described below

commit d69c055cbc3aaf00ce45e6631feed12285165797
Author: starocean999 <40...@users.noreply.github.com>
AuthorDate: Thu Apr 27 09:33:00 2023 +0800

    [fix](fe)hll_raw_agg function's return type should be always not nullable (#19128)
    
    * [fix](fe)hll_raw_agg function's return type should be always not nullable
    
    * add test cases
---
 .../src/main/java/org/apache/doris/catalog/AggregateFunction.java    | 2 +-
 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(+), 2 deletions(-)

diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/AggregateFunction.java b/fe/fe-core/src/main/java/org/apache/doris/catalog/AggregateFunction.java
index 2beb5504cf..09cb22b59e 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/catalog/AggregateFunction.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/AggregateFunction.java
@@ -48,7 +48,7 @@ public class AggregateFunction extends Function {
 
     public static ImmutableSet<String> NOT_NULLABLE_AGGREGATE_FUNCTION_NAME_SET = ImmutableSet.of("row_number", "rank",
             "dense_rank", "multi_distinct_count", "multi_distinct_sum", FunctionSet.HLL_UNION_AGG,
-            FunctionSet.HLL_UNION, FunctionSet.BITMAP_UNION, FunctionSet.BITMAP_INTERSECT,
+            FunctionSet.HLL_UNION, FunctionSet.HLL_RAW_AGG, FunctionSet.BITMAP_UNION, FunctionSet.BITMAP_INTERSECT,
             FunctionSet.ORTHOGONAL_BITMAP_INTERSECT, FunctionSet.ORTHOGONAL_BITMAP_INTERSECT_COUNT,
             FunctionSet.INTERSECT_COUNT, FunctionSet.ORTHOGONAL_BITMAP_UNION_COUNT,
             FunctionSet.COUNT, "approx_count_distinct", "ndv", FunctionSet.BITMAP_UNION_INT,
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 767a1dc038..d019ed1009 100644
--- a/regression-test/data/types/complex_types/basic_agg_test.out
+++ b/regression-test/data/types/complex_types/basic_agg_test.out
@@ -14,3 +14,8 @@
 2	1
 3	2
 
+-- !sql_hll_cardinality2 --
+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 06ddf9a383..8bac487692 100644
--- a/regression-test/suites/types/complex_types/basic_agg_test.groovy
+++ b/regression-test/suites/types/complex_types/basic_agg_test.groovy
@@ -26,7 +26,9 @@ suite("basic_agg_test", "types") {
 
     qt_sql_bitmap """select * from bitmap_basic_agg;"""
 
-    qt_sql_hll """select * from hll_basic_agg;"""
+    qt_sql_hll """select * from hll_basic_agg order by k1;"""
 
     qt_sql_hll_cardinality """select k1, hll_cardinality(hll_union(k2)) from hll_basic_agg group by k1 order by k1;"""
+
+    qt_sql_hll_cardinality2 """select k1, hll_cardinality(hll_raw_agg(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