Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-13152

IllegalStateException in computing processing cost when there are predicates on analytic output columns

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • Impala 4.5.0
    • Frontend
    • None

    Description

      Saw an error in the following query when is on:

      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!
      

      Exception in the logs:

      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)

      Don't see the error if removing the predicate "latest=1".

      Attachments

        Activity

          People

            rizaon Riza Suminto
            stigahuang Quanlong Huang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: