Skip to content

Commit

Permalink
[Enhance](function) add boolean type for sum agg function (#21862)
Browse files Browse the repository at this point in the history
before the sum agg not register for boolean type, so it need cast to other type can execute.
  • Loading branch information
zhangstar333 authored Jul 18, 2023
1 parent 37ca133 commit b6517ed
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1100,6 +1100,14 @@ private void initAggregateBuiltins() {
// 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, "",
"",
Expand Down

0 comments on commit b6517ed

Please sign in to comment.