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

Failed Preconditions.checkState(literalPredicate.isConstant()) (IllegalStateException: null)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • Impala 2.0
    • Impala 2.1
    • None
    • None
    • commit 0d3cd410c9bf50a5b4658e299b247ac764f42b55
      Author: Nong Li <nong@cloudera.com>
      Date: Sun Oct 5 12:10:18 2014 -0700

          Log leaks on release builds.

    Description

      A more complicated query failed with an ArrayIndexOutOfBounds exception. Below is a simplified version that gives an error but I'm not sure it's the same problem.

      ERROR: IllegalStateException: null
      Could not execute command: 
      select 1 FROM (
        WITH w AS (
          SELECT 1
          FROM alltypestiny t1
          WHERE EXISTS (SELECT 1 FROM alltypestiny t1))
        SELECT 1 FROM w t
      ) tt
      

      stack trace

      I1006 09:28:52.437743 47494 jni-util.cc:177] java.lang.IllegalStateException
        at com.google.common.base.Preconditions.checkState(Preconditions.java:129)
        at com.cloudera.impala.planner.HdfsPartitionFilter.buildPartitionPredicate(HdfsPartitionFilter.java:121)
        at com.cloudera.impala.planner.HdfsPartitionFilter.getMatchingPartitionIds(HdfsPartitionFilter.java:90)
        at com.cloudera.impala.planner.HdfsScanNode.evalPartitionFiltersInBe(HdfsScanNode.java:555)
        at com.cloudera.impala.planner.HdfsScanNode.prunePartitions(HdfsScanNode.java:513)
        at com.cloudera.impala.planner.HdfsScanNode.init(HdfsScanNode.java:131)
        at com.cloudera.impala.planner.Planner.createScanNode(Planner.java:1738)
        at com.cloudera.impala.planner.Planner.createTableRefNode(Planner.java:1994)
        at com.cloudera.impala.planner.Planner.createSelectPlan(Planner.java:1471)
        at com.cloudera.impala.planner.Planner.createQueryPlan(Planner.java:1107)
        at com.cloudera.impala.planner.Planner.createInlineViewPlan(Planner.java:1708)
        at com.cloudera.impala.planner.Planner.createTableRefNode(Planner.java:1997)
        at com.cloudera.impala.planner.Planner.createSelectPlan(Planner.java:1471)
        at com.cloudera.impala.planner.Planner.createQueryPlan(Planner.java:1107)
        at com.cloudera.impala.planner.Planner.createInlineViewPlan(Planner.java:1708)
        at com.cloudera.impala.planner.Planner.createTableRefNode(Planner.java:1997)
        at com.cloudera.impala.planner.Planner.createSelectPlan(Planner.java:1471)
        at com.cloudera.impala.planner.Planner.createQueryPlan(Planner.java:1107)
        at com.cloudera.impala.planner.Planner.createPlanFragments(Planner.java:133)
        at com.cloudera.impala.service.Frontend.createExecRequest(Frontend.java:835)
        at com.cloudera.impala.service.JniFrontend.createExecRequest(JniFrontend.java:139)
      

      More complicated query

      ERROR: ArrayIndexOutOfBoundsException: 101
      Could not execute command: select CONCAT(t1.string_col_1, t1.string_col_1) AS string_col_1,
             COUNT(t1.string_col_1) AS int_col_2,
             MAX(t1.int_col_3 - t1.int_col_3 + t1.int_col_2) + MAX(t1.int_col_3 - t1.int_col_2) * AVG(t1.int_col_3) + MIN(t1.int_col_2) - COUNT(DISTINCT t1.int_col_3 * LENGTH(CONCAT(t1.string_col_1, t1.string_col_1)) - t1.int_col_2 + t1.int_col_3 - t1.int_col_3 - t1.int_col_3) AS double_col_3
      FROM (WITH with_1_869 AS
              (SELECT COUNT(CONCAT(t1.varchar256_col, TRIM(t1.char129_col))) AS int_col_1,
                      t1.string_col AS string_col_2,
                      CONCAT(t1.string_col, t1.string_col) AS string_col_3
               FROM text_types t1
               WHERE EXISTS
                   (SELECT CONCAT(t1.varchar256_col, t1.string_col) AS string_col_1,
                           t1.char129_col AS char129_col_2,
                           t1.varchar256_col AS varchar_col_3
                    FROM text_types2 t1
                    WHERE t1.varchar256_col IS NULL
                      AND t1.char129_col IS NULL)
                 AND CONCAT(CONCAT(TRIM(t1.char127_col), t1.varchar256_col),
                              (SELECT CAST(ROW_NUMBER() OVER (
                                                              ORDER BY t1.string_col ASC, CONCAT(TRIM(t1.char129_col), t1.varchar256_col) ASC, CONCAT(CONCAT(TRIM(t1.char129_col), t1.string_col), t1.varchar256_col) DESC) AS STRING) AS string_col_1
                               FROM text_types t1
                               WHERE t1.varchar256_col = TRIM(t1.char129_col)
                                 AND t1.char127_col IS NOT NULL
                               ORDER BY CAST(ROW_NUMBER() OVER (
                                                                ORDER BY t1.string_col ASC, CONCAT(TRIM(t1.char129_col), t1.varchar256_col) ASC, CONCAT(CONCAT(TRIM(t1.char129_col), t1.string_col), t1.varchar256_col) DESC) AS STRING) ASC LIMIT 1)) = t1.string_col
                 AND t1.varchar256_col = TRIM(t1.char127_col)
                 AND CONCAT(t1.string_col, TRIM(t1.char127_col)) = TRIM(t1.char127_col)
               GROUP BY t1.string_col,
                        CONCAT(t1.string_col, t1.string_col) HAVING COUNT(t1.char127_col) + COUNT(CONCAT(t1.varchar256_col, TRIM(t1.char129_col))) + COUNT(CONCAT(CONCAT(t1.string_col, TRIM(t1.char129_col)), t1.string_col)) + COUNT(CONCAT(CONCAT(CONCAT(CONCAT(TRIM(t1.char127_col), TRIM(t1.char129_col)), t1.string_col), t1.varchar256_col), TRIM(t1.char127_col))) - COUNT(CONCAT(CONCAT(TRIM(t1.char129_col), TRIM(t1.char129_col)), t1.varchar256_col)) * COUNT(CONCAT(CONCAT(CONCAT(CONCAT(CONCAT(TRIM(t1.char127_col), t1.string_col), t1.varchar256_col), t1.varchar256_col), t1.varchar256_col), t1.varchar256_col)) + COUNT(CONCAT(CONCAT(CONCAT(TRIM(t1.char129_col), TRIM(t1.char127_col)), TRIM(t1.char127_col)), TRIM(t1.char129_col))) = COUNT(t1.char129_col) - COUNT(CONCAT(CONCAT(CONCAT(t1.string_col, t1.string_col), t1.string_col), TRIM(t1.char129_col))))
            SELECT CONCAT(CONCAT(CONCAT(CONCAT(t1.string_col_3, t1.string_col_3), t1.string_col_3), t1.string_col_2), t1.string_col_3) AS string_col_1,
                   t1.int_col_1 + LENGTH(CONCAT(CONCAT(t1.string_col_2, t1.string_col_3), t1.string_col_2)) AS int_col_2,
                   COUNT(t1.string_col_2) AS int_col_3
            FROM with_1_869 t1
            GROUP BY CONCAT(CONCAT(CONCAT(CONCAT(t1.string_col_3, t1.string_col_3), t1.string_col_3), t1.string_col_2), t1.string_col_3),
                     t1.int_col_1 + LENGTH(CONCAT(CONCAT(t1.string_col_2, t1.string_col_3), t1.string_col_2))) t1
      GROUP BY CONCAT(t1.string_col_1, t1.string_col_1) HAVING MAX(t1.int_col_2) + COUNT(CONCAT(CONCAT(CAST(t1.int_col_2 - t1.int_col_2 AS STRING), t1.string_col_1), t1.string_col_1)) > AVG(t1.int_col_2)
      

      Attachments

        Activity

          People

            mjacobs Matthew Jacobs
            caseyc casey
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: