Sheng Wang created IMPALA-11021:
-----------------------------------
Summary: Impala throw IllegalStateException when use predicate
hint in query with subquery
Key: IMPALA-11021
URL: https://issues.apache.org/jira/browse/IMPALA-11021
Project: IMPALA
Issue Type: Bug
Affects Versions: Impala 4.0.0
Reporter: Sheng Wang
Assignee: Sheng Wang
Hi [~stigahuang],[~amargoor], recently when I worked on IMPALA-7942, I found a
bug when use predicate hint in query with subquery. Here is the query to
reproduce this exception:
{code:java}
select * from tpch.lineitem where /* +ALWAYS_TRUE_TEST */ l_shipdate <= (select
'1998-09-02') limit 10;
{code}
Here is the stack:
{code:java}
I1117 00:42:38.977468 23408 jni-util.cc:286] b14b98e13bd40747:07fc212b00000000]
java.lang.IllegalStateException: Failed analysis after expr substitution.
at org.apache.impala.analysis.Expr.substituteList(Expr.java:1118)
at
org.apache.impala.analysis.SelectStmt.materializeRequiredSlots(SelectStmt.java:1069)
at
org.apache.impala.planner.SingleNodePlanner.createSelectPlan(SingleNodePlanner.java:701)
at
org.apache.impala.planner.SingleNodePlanner.createQueryPlan(SingleNodePlanner.java:278)
at
org.apache.impala.planner.SingleNodePlanner.createSingleNodePlan(SingleNodePlanner.java:170)
at
org.apache.impala.planner.Planner.createPlanFragments(Planner.java:121)
at org.apache.impala.planner.Planner.createPlans(Planner.java:248)
at
org.apache.impala.service.Frontend.createExecRequest(Frontend.java:1543)
at
org.apache.impala.service.Frontend.getPlannedExecRequest(Frontend.java:1885)
at
org.apache.impala.service.Frontend.doCreateExecRequest(Frontend.java:1733)
at
org.apache.impala.service.Frontend.getTExecRequest(Frontend.java:1625)
at
org.apache.impala.service.Frontend.createExecRequest(Frontend.java:1595)
at
org.apache.impala.service.JniFrontend.createExecRequest(JniFrontend.java:162)
{code}
I've already read the code, this is due to re analyze phase for subquery. When
add warning msg in Expr.analyzeHints() after re analyze, this code check failed:
{code:java}
Preconditions.checkState(!globalState_.warningsRetrieved)
{code}
I'm not sure if this bug already fixed on master branch. If not, I'd like to
try this.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]