Quanlong Huang created IMPALA-13152:
---------------------------------------
Summary: IllegalStateException in computing processing cost when
there are predicates on analytic output columns
Key: IMPALA-13152
URL: https://issues.apache.org/jira/browse/IMPALA-13152
Project: IMPALA
Issue Type: Bug
Components: Frontend
Reporter: Quanlong Huang
Assignee: Riza Suminto
Saw an error in the following query when is on:
{code:sql}
create table tbl (a int, b int, c int);
set COMPUTE_PROCESSING_COST=1;
explain select a, b from (
select a, b, c,
row_number() over(partition by a order by b desc) as latest
from tbl
)b
WHERE latest=1
ERROR: IllegalStateException: Processing cost of PlanNode 01:TOP-N is invalid!
{code}
Exception in the logs:
{noformat}
I0611 13:04:37.192874 28004 jni-util.cc:321] 264ee79bfb6ac031:42f8006c00000000]
java.lang.IllegalStateException: Processing cost of PlanNode 01:TOP-N is
invalid!
at
com.google.common.base.Preconditions.checkState(Preconditions.java:512)
at
org.apache.impala.planner.PlanNode.computeRowConsumptionAndProductionToCost(PlanNode.java:1047)
at
org.apache.impala.planner.PlanFragment.computeCostingSegment(PlanFragment.java:287)
at
org.apache.impala.planner.Planner.computeProcessingCost(Planner.java:560)
at
org.apache.impala.service.Frontend.createExecRequest(Frontend.java:1932)
at
org.apache.impala.service.Frontend.getPlannedExecRequest(Frontend.java:2892)
at
org.apache.impala.service.Frontend.doCreateExecRequest(Frontend.java:2676)
at
org.apache.impala.service.Frontend.getTExecRequest(Frontend.java:2224)
at
org.apache.impala.service.Frontend.createExecRequest(Frontend.java:1985)
at
org.apache.impala.service.JniFrontend.createExecRequest(JniFrontend.java:175){noformat}
Don't see the error if removing the predicate "latest=1".
--
This message was sent by Atlassian Jira
(v8.20.10#820010)