Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Fixed
-
Impala 2.3.0
-
On the 2.3 release branch, commit d13cc3e90b767350ff5abc2e720b0ed2ed158a60
Description
There is something special about using decimals in FIRST_VALUE below
Query: explain SELECT 1 IN (FIRST_VALUE(CAST(int_col AS DECIMAL)) OVER (ORDER BY int_col ROWS BETWEEN 2 PRECEDING AND 1 PRECEDING)) FROM alltypestiny ERROR: AnalysisException: null CAUSED BY: IllegalStateException: null
logs
I1011 00:28:01.753911 1838 Frontend.java:836] analyze query explain SELECT 1 IN (FIRST_VALUE(CAST(int_col AS DECIMAL)) OVER (ORDER BY int_col ROWS BETWEEN 2 PRECEDING AND 1 PRECEDING)) FROM alltypestiny I1011 00:28:01.755635 1838 jni-util.cc:177] com.cloudera.impala.common.AnalysisException at com.cloudera.impala.analysis.AnalysisContext.analyze(AnalysisContext.java:367) at com.cloudera.impala.analysis.AnalysisContext.analyze(AnalysisContext.java:322) at com.cloudera.impala.service.Frontend.analyzeStmt(Frontend.java:845) at com.cloudera.impala.service.Frontend.createExecRequest(Frontend.java:874) at com.cloudera.impala.service.JniFrontend.createExecRequest(JniFrontend.java:147) Caused by: java.lang.IllegalStateException at com.google.common.base.Preconditions.checkState(Preconditions.java:129) at com.cloudera.impala.analysis.NumericLiteral.uncheckedCastTo(NumericLiteral.java:233) at com.cloudera.impala.analysis.Expr.castTo(Expr.java:983) at com.cloudera.impala.analysis.Analyzer.castAllToCompatibleType(Analyzer.java:2125) at com.cloudera.impala.analysis.InPredicate.analyze(InPredicate.java:131) at com.cloudera.impala.analysis.SelectStmt.analyze(SelectStmt.java:190) at com.cloud