walterddr commented on code in PR #11937: URL: https://github.com/apache/pinot/pull/11937#discussion_r1387469626
########## pinot-query-planner/src/main/java/org/apache/calcite/rel/rules/PinotRuleUtils.java: ########## @@ -68,19 +69,28 @@ public static boolean isAggregate(RelNode rel) { } // TODO: optimize this part out as it is not efficient to scan the entire subtree for exchanges. - public static boolean noExchangeInSubtree(RelNode relNode) { - if (relNode instanceof HepRelVertex) { - relNode = ((HepRelVertex) relNode).getCurrentRel(); - } - if (relNode instanceof Exchange) { + public static boolean canPushDynamicBroadcastToLeaf(RelNode relNode) { Review Comment: change this to positive-search: only allow nodes that doesn't change row-semantics - JOIN/PROJECT/FILTER/TABLE_SCAN - technically WINDOW and SORT also doesn't change row-semantics but SORT could have limit and WINDOW is not implemented on leaf. will follow up later -- 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...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org