[
https://issues.apache.org/jira/browse/HIVE-29729?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Riju Trivedi updated HIVE-29729:
--------------------------------
Description:
When CBO plans a query where an {{IS NOT NULL}} predicate sits above a sub-plan
that contains a windowing ({{{}OVER(...){}}}) {{{}Project{}}}, planning fails
with an {{ArrayIndexOutOfBoundsException}} thrown from inside
{{{}HiveFilterProjectTransposeRule{}}}'s redundant-{{{}IS NOT NULL{}}} check
(the {{RedundancyChecker}} {{{}RelVisitor{}}}).
{code:java}
java.lang.ArrayIndexOutOfBoundsException: Index 4 out of bounds for length 4
at ...RegularImmutableList.get(RegularImmutableList.java:60)
at org.apache.calcite.plan.RelOptUtil$2.visitInputRef(RelOptUtil.java:3181)
at org.apache.calcite.rex.RexShuttle.visitFieldCollations(RexShuttle.java:186)
at org.apache.calcite.rex.RexShuttle.visitWindow(RexShuttle.java:66)
at org.apache.calcite.rex.RexShuttle.visitOver(RexShuttle.java:44)
at org.apache.calcite.rex.RexOver.accept(RexOver.java:122) ...
at
org.apache.calcite.plan.RelOptUtil.pushPastProjectUnlessBloat(RelOptUtil.java:3166)
at ...HiveRelOptUtil.pushPastProjectUnlessBloat(HiveRelOptUtil.java:737)
at
...HiveFilterProjectTransposeRule$RedundancyChecker.visit(HiveFilterProjectTransposeRule.java:341)
...{code}
was:
When CBO plans a query where an {{IS NOT NULL}} predicate sits above a sub-plan
that contains a windowing ({{{}OVER(...){}}}) {{{}Project{}}}, planning fails
with an {{ArrayIndexOutOfBoundsException}} thrown from inside
{{{}HiveFilterProjectTransposeRule{}}}'s redundant-{{{}IS NOT NULL{}}} check
(the {{RedundancyChecker}} {{{}RelVisitor{}}}).
{code:java}
java.lang.ArrayIndexOutOfBoundsException:
at org.apache.calcite.plan.RelOptUtil.pushPastProjectUnlessBloat(...) at
org.apache.hadoop.hive.ql.optimizer.calcite.HiveRelOptUtil.pushPastProjectUnlessBloat(HiveRelOptUtil.java:730)
at
org.apache.hadoop.hive.ql.optimizer.calcite.rules.HiveFilterProjectTransposeRule$RedundancyChecker.visit(HiveFilterProjectTransposeRule.java:341)
... {code}
> AIBOE in HiveFilterProjectTransposeRule during CBO planning for filters over
> windowing Projects
> -----------------------------------------------------------------------------------------------
>
> Key: HIVE-29729
> URL: https://issues.apache.org/jira/browse/HIVE-29729
> Project: Hive
> Issue Type: Bug
> Components: CBO, Hive
> Affects Versions: 4.2.0
> Reporter: Riju Trivedi
> Assignee: Riju Trivedi
> Priority: Major
>
> When CBO plans a query where an {{IS NOT NULL}} predicate sits above a
> sub-plan that contains a windowing ({{{}OVER(...){}}}) {{{}Project{}}},
> planning fails with an {{ArrayIndexOutOfBoundsException}} thrown from inside
> {{{}HiveFilterProjectTransposeRule{}}}'s redundant-{{{}IS NOT NULL{}}} check
> (the {{RedundancyChecker}} {{{}RelVisitor{}}}).
> {code:java}
> java.lang.ArrayIndexOutOfBoundsException: Index 4 out of bounds for length 4
> at ...RegularImmutableList.get(RegularImmutableList.java:60)
> at org.apache.calcite.plan.RelOptUtil$2.visitInputRef(RelOptUtil.java:3181)
> at
> org.apache.calcite.rex.RexShuttle.visitFieldCollations(RexShuttle.java:186)
> at org.apache.calcite.rex.RexShuttle.visitWindow(RexShuttle.java:66)
> at org.apache.calcite.rex.RexShuttle.visitOver(RexShuttle.java:44)
> at org.apache.calcite.rex.RexOver.accept(RexOver.java:122) ...
> at
> org.apache.calcite.plan.RelOptUtil.pushPastProjectUnlessBloat(RelOptUtil.java:3166)
>
> at ...HiveRelOptUtil.pushPastProjectUnlessBloat(HiveRelOptUtil.java:737)
> at
> ...HiveFilterProjectTransposeRule$RedundancyChecker.visit(HiveFilterProjectTransposeRule.java:341)
> ...{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)