wangshuo128 commented on code in PR #13416: URL: https://github.com/apache/doris/pull/13416#discussion_r1003970016
########## fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalOlapScan.java: ########## @@ -164,30 +164,31 @@ public long getSelectedIndexId() { return selectedIndexId; } - public boolean isRollupSelected() { - return rollupSelected; + public boolean isIndexSelected() { + return indexSelected; } public PreAggStatus getPreAggStatus() { return preAggStatus; } /** - * Should apply {@link SelectRollupWithAggregate} or not. + * Should apply {@link SelectMaterializedIndexWithAggregate} or not. */ - public boolean shouldSelectRollup() { + public boolean shouldSelectIndex() { Review Comment: This was to do two things: 1. judge `indexSelected` is true or false 2. make sure the keys type of the OLAP table is `DUP_KEYS`, `UNIQUE_KEYS`, or `AGG_KEYS`, but it should not be `PRIMARY_KEYS`. Even if it seems `PRIMARY_KEYS` is not used, it's safe to ensure the scope to apply materialized view selection rules is right. I'd unify `shouldSelectIndex()` and `isIndexSelected()` into one. -- 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