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

Expr rewrite causes IllegalStateException

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: Impala 2.8.0
    • Fix Version/s: Impala 2.9.0
    • Component/s: Frontend
    • Labels:

      Description

      The query: 'select decode(0, 1, 1, id, 1) from functional.alltypessmall;' works as expected with enable_expr_rewrites=false, but with rewrites enabled gives:

      ERROR: AnalysisException: null
      CAUSED BY: IllegalStateException: child 0 type: INT child 1 type: TINYINT

      Caused by: java.lang.IllegalStateException: child 0 type: INT child 1 type: TINYINT
      at com.google.common.base.Preconditions.checkState(Preconditions.java:145)
      at org.apache.impala.analysis.BinaryPredicate.toThrift(BinaryPredicate.java:155)
      at org.apache.impala.analysis.Expr.treeToThriftHelper(Expr.java:529)
      at org.apache.impala.analysis.Expr.treeToThrift(Expr.java:511)
      at org.apache.impala.service.FeSupport.EvalExprWithoutRow(FeSupport.java:126)
      at org.apache.impala.analysis.LiteralExpr.create(LiteralExpr.java:173)
      at org.apache.impala.rewrite.FoldConstantsRule.apply(FoldConstantsRule.java:56)
      at org.apache.impala.rewrite.ExprRewriter.applyRuleBottomUp(ExprRewriter.java:85)
      at org.apache.impala.rewrite.ExprRewriter.applyRuleBottomUp(ExprRewriter.java:83)
      at org.apache.impala.rewrite.ExprRewriter.applyRuleRepeatedly(ExprRewriter.java:71)
      at org.apache.impala.rewrite.ExprRewriter.rewrite(ExprRewriter.java:55)
      at org.apache.impala.analysis.SelectList.rewriteExprs(SelectList.java:93)
      at org.apache.impala.analysis.SelectStmt.rewriteExprs(SelectStmt.java:886)
      at org.apache.impala.analysis.AnalysisContext.analyze(AnalysisContext.java:388)
      ... 4 more

        Attachments

          Activity

            People

            • Assignee:
              twmarshall Thomas Tauber-Marshall
              Reporter:
              twmarshall Thomas Tauber-Marshall
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: