imay commented on a change in pull request #2294: Add convert tablet rowset type
URL: https://github.com/apache/incubator-doris/pull/2294#discussion_r350670703
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/planner/RollupSelector.java
 ##########
 @@ -95,6 +95,20 @@ private long selectBestRowCountRollup(List<Long> 
bestPrefixIndexRollups, Collect
                 }
             }
         }
+        String tableName = table.getName();
+        String v2RollupIndexName = "__v2_" + tableName;
+        Long v2RollupIndex = table.getIndexIdByName(v2RollupIndexName);
+        long baseIndexId = table.getBaseIndexId();
+        if (baseIndexId == selectedIndexId && v2RollupIndex != null) {
+            // if the selectedIndexId is baseIndexId
+            // check whether there is a V2 rollup index
+            // if exist, use v2 rollup index
+            selectedIndexId = v2RollupIndex;
+            LOG.info("use v2 rollup index to replace base index");
+        }
+        if (v2RollupIndex != null && selectedIndexId == v2RollupIndex) {
+            LOG.info("table:{} has v2 rollup index, use v2 rollup index:{}", 
tableName, v2RollupIndex);
+        }
 
 Review comment:
   remove this log too.

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


With regards,
Apache Git Services

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

Reply via email to