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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]