You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2021/01/30 01:44:42 UTC

[GitHub] [incubator-doris] chaoyli commented on a change in pull request #5315: Adding a column with SUM aggregation to table should restrict the default value

chaoyli commented on a change in pull request #5315:
URL: https://github.com/apache/incubator-doris/pull/5315#discussion_r566539066



##########
File path: fe/fe-core/src/main/java/org/apache/doris/alter/SchemaChangeHandler.java
##########
@@ -753,6 +753,8 @@ private void addColumnInternal(OlapTable olapTable, Column newColumn, ColumnPosi
                 throw new DdlException("Can not assign aggregation method on key column: " +  newColName);
             } else if (null == newColumn.getAggregationType()) {
                 newColumn.setIsKey(true);
+            } else if (newColumn.getAggregationType() == AggregateType.SUM && !newColumn.getDefaultValue().equals("0")) {

Review comment:
       OK




----------------------------------------------------------------
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:
users@infra.apache.org



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