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 2019/12/10 14:36:25 UTC

[GitHub] [incubator-doris] morningman commented on a change in pull request #2412: [CHANGE] change default storage model from aggregate to duplicate(#2318)

morningman commented on a change in pull request #2412: [CHANGE] change default storage model from aggregate to duplicate(#2318)
URL: https://github.com/apache/incubator-doris/pull/2412#discussion_r356052544
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/analysis/CreateTableStmt.java
 ##########
 @@ -215,9 +218,14 @@ public void analyze(Analyzer analyzer) throws AnalysisException, UserException {
                 // olap table
                 if (keysDesc == null) {
                     List<String> keysColumnNames = Lists.newArrayList();
+                    int keyLength = 0;
                     for (ColumnDef columnDef : columnDefs) {
                         if (columnDef.getAggregateType() == null) {
-                            keysColumnNames.add(columnDef.getName());
+                            keyLength += columnDef.getType().getColumnSize() == null ? 0:
+                                    columnDef.getType().getColumnSize();
 
 Review comment:
   I think you would use `getStorageLayoutBytes()` to get the column size

----------------------------------------------------------------
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


With regards,
Apache Git Services

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