morrySnow commented on code in PR #38565: URL: https://github.com/apache/doris/pull/38565#discussion_r1701120705
########## fe/fe-core/src/main/java/org/apache/doris/planner/HashDistributionPruner.java: ########## @@ -79,10 +80,13 @@ public Collection<Long> prune(int columnId, PartitionKey hashKey, int complex) { return Lists.newArrayList(bucketsList.get((int) ((hashValue & 0xffffffff) % hashMod))); } Column keyColumn = distributionColumns.get(columnId); - String columnName = isBaseIndexSelected ? keyColumn.getName() - : org.apache.doris.nereids.rules.rewrite.mv.AbstractSelectMaterializedIndexRule + String columnName = keyColumn.getName(); + if (!isBaseIndexSelected && ConnectContext.get().getSessionVariable().isEnableNereidsPlanner()) { Review Comment: use isEnableNereidsPlanner is not a good way, because we could fallback to legacy planner, even if isEnableNereidsPlanner is true. maybe u could use `org.apache.doris.qe.QueryState#isNereids` -- 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