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

NPE when "optimized" expression contains an aggregation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Duplicate
    • Impala 2.9.0
    • None
    • Frontend

    Description

      This seems similar to IMPALA-5125, but in this bug, we hit a Java NPE and error, not a DCHECK, so I think it's important to file this separately for now, since some path is different.

      query:

      EXPLAIN
      SELECT IF(false, AVG(id), -1)
      FROM functional.alltypestiny;
      
      I0413 14:32:19.962172  9649 jni-util.cc:176] java.lang.NullPointerException
              at org.apache.impala.analysis.Analyzer.getEquivClasses(Analyzer.java:1781)
              at org.apache.impala.analysis.Analyzer.createEquivConjuncts(Analyzer.java:1744)
              at org.apache.impala.planner.AggregationNode.init(AggregationNode.java:147)
              at org.apache.impala.planner.SingleNodePlanner.createAggregationPlan(SingleNodePlanner.java:892)
              at org.apache.impala.planner.SingleNodePlanner.createSelectPlan(SingleNodePlanner.java:616)
              at org.apache.impala.planner.SingleNodePlanner.createQueryPlan(SingleNodePlanner.java:254)
              at org.apache.impala.planner.SingleNodePlanner.createSingleNodePlan(SingleNodePlanner.java:147)
              at org.apache.impala.planner.Planner.createPlan(Planner.java:87)
              at org.apache.impala.service.Frontend.createExecRequest(Frontend.java:1012)
              at org.apache.impala.service.Frontend.createExecRequest(Frontend.java:1103)
              at org.apache.impala.service.JniFrontend.createExecRequest(JniFrontend.java:155)
      

      Just like with IMPALA-5125, using set enable_expr_rewrites=false is a workaround. Just like with IMPALA-5125, including GROUP BY looks OK.

      twmarshall can you take the first look? I'm going under the assumption that this is a dupe of IMPALA-5125 based on RCA, or at least meta-similar. Again, though, different effect (no crash) means at least initially a separate bug. Thanks.

      Attachments

        Activity

          People

            twmarshall Thomas Tauber-Marshall
            mikeb Michael Brown
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: