zhangstar333 commented on code in PR #21959: URL: https://github.com/apache/doris/pull/21959#discussion_r1267579851
########## fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/agg/Sum.java: ########## @@ -78,8 +80,9 @@ public Sum(boolean distinct, boolean alwaysNullable, Expression arg) { @Override public void checkLegalityBeforeTypeCoercion() { DataType argType = child().getDataType(); - if (((!argType.isNumericType() && !argType.isNullType()) || argType.isOnlyMetricType())) { - throw new AnalysisException("sum requires a numeric parameter: " + this.toSql()); + if ((!argType.isNumericType() && !argType.isBooleanType() && !argType.isNullType()) + || argType.isOnlyMetricType()) { + throw new AnalysisException("sum requires a numeric or boolean parameter: " + this.toSql()); Review Comment: done -- 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