kangkaisen commented on a change in pull request #4199:
URL: https://github.com/apache/incubator-doris/pull/4199#discussion_r461353389
##########
File path:
fe/fe-core/src/main/java/org/apache/doris/analysis/CreateMaterializedViewStmt.java
##########
@@ -30,11 +34,6 @@
import org.apache.doris.common.FeNameFormat;
import org.apache.doris.common.UserException;
Review comment:
Hi, you could update the `checkstyle.xml`.
##########
File path:
fe/fe-core/src/main/java/org/apache/doris/analysis/CreateMaterializedViewStmt.java
##########
@@ -353,11 +353,21 @@ public MVColumnItem buildMVColumnItem(FunctionCallExpr
functionCallExpr) throws
Type type;
switch (functionName.toLowerCase()) {
case "sum":
+ mvColumnName = baseColumnName;
+ mvAggregateType =
AggregateType.valueOf(functionName.toUpperCase());
+ PrimitiveType baseColumnType =
baseColumnRef.getType().getPrimitiveType();
+ if (baseColumnType == PrimitiveType.TINYINT || baseColumnType
== PrimitiveType.SMALLINT
+ || baseColumnType == PrimitiveType.INT) {
+ type = Type.BIGINT;
+ } else {
+ type =
Type.fromPrimitiveType(baseColumnRef.getType().getPrimitiveType());
Review comment:
Sum float result type should be double.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]