Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
Impala 4.0.0
-
None
-
None
-
ghx-label-1
Description
Hi stigahuang,amargoor, recently when I worked on IMPALA-7942, I found a bug when use predicate hint in query. Here is the query to reproduce this exception:
select * from tpch.lineitem where /* +ALWAYS_TRUE_TEST */ l_shipdate <= (select '1998-09-02') limit 10;
Here is the stack:
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)
I've already read the code, this is due to predicate analyze failed after clone, this code check failed:
Preconditions.checkState(!globalState_.warningsRetrieved)
I'm not sure if this bug already fixed on master branch. If not, I'd like to try this.