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 b6517ed83b [Enhance](function) add boolean type for sum agg function 
(#21862)
b6517ed83b is described below

commit b6517ed83b1731c1c37fde4c35a5296ff347b9e7
Author: zhangstar333 <[email protected]>
AuthorDate: Tue Jul 18 08:06:52 2023 +0800

    [Enhance](function) add boolean type for sum agg function (#21862)
    
    before the sum agg not register for boolean type, so it need cast to other 
type can execute.
---
 .../src/main/java/org/apache/doris/catalog/FunctionSet.java       | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/FunctionSet.java 
b/fe/fe-core/src/main/java/org/apache/doris/catalog/FunctionSet.java
index 1e1292faf8..b6c7ab2a3a 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/catalog/FunctionSet.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/FunctionSet.java
@@ -1100,6 +1100,14 @@ public class FunctionSet<T> {
         // Sum
         String []sumNames = {"sum", "sum_distinct"};
         for (String name : sumNames) {
+            addBuiltin(AggregateFunction.createBuiltin(name,
+                    Lists.<Type>newArrayList(Type.BOOLEAN), Type.BIGINT, 
Type.BIGINT, "",
+                    "",
+                    "",
+                    null, null,
+                    "",
+                    null, false, true, false, true));
+
             addBuiltin(AggregateFunction.createBuiltin(name,
                     Lists.<Type>newArrayList(Type.TINYINT), Type.BIGINT, 
Type.BIGINT, "",
                     "",


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to