rtrivedi12 opened a new pull request, #6601: URL: https://github.com/apache/hive/pull/6601
…ng for filters over windowing Projects ### What changes were proposed in this pull request? RedundancyChecker.visit(...) in HiveFilterProjectTransposeRule now skips (returns) when it reaches a Project that contains window functions (RexOver), instead of calling pushPastProjectUnlessBloat on it. This mirrors the guard that already exists in onMatch(...) and the visitor's existing "unsupported node → return" behaviour ### Why are the changes needed? isRedundantIsNotNull(...) (added in HIVE-25275) walks down the plan and pushes the predicate past each Project. For a Project holding RexOver expressions, Calcite's pushPastProjectUnlessBloat rewrites the RexInputRefs inside the window PARTITION BY / ORDER BY specs; those refs index into the input row type and can exceed the projection list size, throwing ArrayIndexOutOfBoundsException during CBO planning ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? mvn test -pl itests/qtest -Pitests -Dtest=TestMiniLlapLocalCliDriver -Dqfile=cbo_filter_pushdown_windowing_notnull.q -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
