songwdfu opened a new pull request, #16035: URL: https://github.com/apache/pinot/pull/16035
This commit introduces two low-risk heuristic transformation rules to optProgram. They are considered low-risk because they only matches very specific scenarios and we almost always want to fire them when applicable. Added `PinotJoinPushTransitivePredicatesRule` which pushes transitive predicates below join. This optimizes for scenarios like `a JOIN b ON a.col1 = b.col2 WHERE a.col1 < 100`, then the rule will push `a.col1 < 100` and `b.col2 < 100` to either side of the join respectively. 6 tests in `ResourceBasedQueryPlansTest` are checked and updated to reflect addition of this rule. The Pinot version does not push predicate to the right when lookup join hint is enabled. A test case for this is added to `QueryCompilationTest`. Added `PruneEmptyRules.CORRELATE_LEFT_INSTANCE` and its right equivalence in `PRUNE_RULES` that optimizes empty correlate joins to dummy. These queries would throw before this commit since Pinot does not support `CORRELATE` node. Existing tests before this commit didn't cover any case that this rule would apply. Added test in `QueryCompilationTest`. This commit also fixes a bug in `PRUNE_RULES` that the original version of `FilterIntoJoinRule` is used instead of the Pinot version. Pinot version should be used as it doesn't push predicates to the right in case of lookup join. No existing tests are effected due to this change. -- 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