starocean999 commented on code in PR #39284:
URL: https://github.com/apache/doris/pull/39284#discussion_r1849612479


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/mv/SelectMaterializedIndexWithoutAggregate.java:
##########
@@ -234,6 +234,7 @@ public static LogicalOlapScan select(
             // So only base index and indexes that have all the keys could be 
used.
             List<MaterializedIndex> candidates = 
table.getVisibleIndex().stream()
                     .filter(index -> 
table.getKeyColumnsByIndexId(index.getId()).size() == baseIndexKeySize)
+                    .filter(index -> containAllKeyColumns(table, index))

Review Comment:
   Does duplicate key table need this check?



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

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

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