shaofengshi commented on a change in pull request #166: KYLIN-3457 Distribute 
by multi column if not set distribute column du…
URL: https://github.com/apache/kylin/pull/166#discussion_r203236629
 
 

 ##########
 File path: core-job/src/main/java/org/apache/kylin/job/JoinedFlatTable.java
 ##########
 @@ -257,11 +263,18 @@ public static String 
generateRedistributeFlatTableStatement(IJoinedFlatTableDesc
         StringBuilder sql = new StringBuilder();
         sql.append("INSERT OVERWRITE TABLE " + tableName + " SELECT * FROM " + 
tableName);
 
-        TblColRef clusterCol = flatDesc.getClusterBy();
-        if (clusterCol != null) {
-            appendClusterStatement(sql, clusterCol);
+        if (flatDesc.getClusterBy() != null) {
+            appendClusterStatement(sql, flatDesc.getClusterBy());
+        } else if (flatDesc.getDistributedBy() != null) {
+            appendDistributeStatement(sql, 
Lists.newArrayList(flatDesc.getDistributedBy()));
         } else {
-            appendDistributeStatement(sql, flatDesc.getDistributedBy());
+            int redistColumnCount = 3;
 
 Review comment:
   Please make this as a configuration

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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

Reply via email to