Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Fixed
-
Impala 2.8.0
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