yangzhg commented on a change in pull request #3424:
URL: https://github.com/apache/incubator-doris/pull/3424#discussion_r424833528



##########
File path: fe/src/main/java/org/apache/doris/alter/MaterializedViewHandler.java
##########
@@ -549,7 +548,10 @@ private RollupJobV2 createMaterializedViewJob(String 
mvName, String baseIndexNam
                     }
                     keyStorageLayoutBytes += 
baseColumn.getType().getStorageLayoutBytes();
                     Column rollupColumn = new Column(baseColumn);
-                    if ((i + 1) <= FeConstants.shortkey_max_column_count
+                    if(changeStorageFormat) {
+                        rollupColumn.setIsKey(baseColumn.isKey());
+                        
rollupColumn.setAggregationType(baseColumn.getAggregationType(), true);

Review comment:
       when create a segmentv2 rollup on duplicate table, the previous code did 
not handle this specific sutiation, it will create a all key rollup, all value 
columns will convert to key column




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



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

Reply via email to