HappenLee commented on a change in pull request #8373:
URL: https://github.com/apache/incubator-doris/pull/8373#discussion_r822408744



##########
File path: be/src/vec/aggregate_functions/aggregate_function_hll_union_agg.h
##########
@@ -52,73 +51,115 @@ struct AggregateFunctionHLLData {
 
     Int64 get_cardinality() const { return dst_hll.estimate_cardinality(); }
 
-    HyperLogLog get() const {
-        return dst_hll;
+    HyperLogLog get() const { return dst_hll; }
+
+    void result_union_agg_impl(IColumn& to) const {
+        if constexpr (is_nullable) {
+            auto& null_column = assert_cast<ColumnNullable&>(to);
+            null_column.get_null_map_data().push_back(0);
+            assert_cast<ColumnInt64&>(null_column.get_nested_column())
+                    .get_data()
+                    .push_back(get_cardinality());
+        } else {
+            
assert_cast<ColumnInt64&>(to).get_data().push_back(get_cardinality());
+        }
+    }
+
+    void result_union_impl(IColumn& to) const {
+        if constexpr (is_nullable) {

Review comment:
       maybe the result is always not nullable 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



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

Reply via email to