You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Tim Armstrong (JIRA)" <ji...@apache.org> on 2018/10/30 18:58:00 UTC

[jira] [Resolved] (IMPALA-6397) IllegalStateException in planning of aggregation with float and decimal literal child expressions

     [ https://issues.apache.org/jira/browse/IMPALA-6397?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tim Armstrong resolved IMPALA-6397.
-----------------------------------
       Resolution: Fixed
    Fix Version/s: Impala 3.0

This was fixed when decimal_v2 became the default.

> IllegalStateException in planning of aggregation with float and decimal literal child expressions
> -------------------------------------------------------------------------------------------------
>
>                 Key: IMPALA-6397
>                 URL: https://issues.apache.org/jira/browse/IMPALA-6397
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Frontend
>    Affects Versions: Impala 2.9.0, Impala 2.10.0, Impala 2.11.0
>            Reporter: Alexander Behm
>            Priority: Major
>              Labels: decimal, planner
>             Fix For: Impala 3.0
>
>
> Reproduction:
> {code}
> select sum(float_col + d) from (select float_col, 1.2 d from functional.alltypes) v;
> ERROR: IllegalStateException: Agg expr sum(float_col + 1.2) returns type DOUBLE but its output tuple slot has type DECIMAL(38,9)
> {code}
> FE Stack:
> {code}
> I0113 14:44:36.300395  9285 jni-util.cc:211] java.lang.IllegalStateException: Agg expr sum(f + 1.2) returns type DOUBLE but its output tuple slot has type DECIMAL(38,9)
> 	at com.google.common.base.Preconditions.checkState(Preconditions.java:145)
> 	at org.apache.impala.analysis.AggregateInfo.checkConsistency(AggregateInfo.java:702)
> 	at org.apache.impala.planner.AggregationNode.init(AggregationNode.java:165)
> 	at org.apache.impala.planner.SingleNodePlanner.createAggregationPlan(SingleNodePlanner.java:895)
> 	at org.apache.impala.planner.SingleNodePlanner.createSelectPlan(SingleNodePlanner.java:621)
> 	at org.apache.impala.planner.SingleNodePlanner.createQueryPlan(SingleNodePlanner.java:257)
> 	at org.apache.impala.planner.SingleNodePlanner.createSingleNodePlan(SingleNodePlanner.java:147)
> 	at org.apache.impala.planner.Planner.createPlan(Planner.java:101)
> 	at org.apache.impala.service.Frontend.createExecRequest(Frontend.java:1044)
> 	at org.apache.impala.service.Frontend.createExecRequest(Frontend.java:1147)
> 	at org.apache.impala.service.JniFrontend.createExecRequest(JniFrontend.java:156)
> {code}
> This bug does not happen with DECIMAL_V2=true. It is specific to the implicit casting behavior of DECIMAL_V1 with decimal literals.
> Note that the following equivalent query without the inline view works fine:
> {code}
> select sum(float_col + 1.2) from functional.alltypes;
> {code}
> Also note that this bug only happens in combination with a decimal literal. The following query also works fine:
> {code}
> create table t (f float, d decimal (2,1));
> select sum(float_col + d) from (select f, d from t) v;
> // works fine
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org