[
https://issues.apache.org/jira/browse/IMPALA-14412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18069025#comment-18069025
]
ASF subversion and git services commented on IMPALA-14412:
----------------------------------------------------------
Commit 94436d4e2198720619b90719c3326f6b37fe30f7 in impala's branch
refs/heads/master from Steve Carlin
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=94436d4e2 ]
IMPALA-14412: Calcite Planner: Need to handle exponent notation correctly
Calcite treats expressions like "1e32" as a double. This commit ensures that
the exponent expressions are parsed as decimal types.
test can be found in decimal-exprs.test
select avg(c) from
(select cast(1e32 as decimal(38,0)) - cast(1 as decimal(38,0)) as c) t;
This change is broken before the Calcite 1.41 upgrade, but can only be fixed
after the 1.41 upgrade has been committed.
Change-Id: Idea6d622e4f2720d323192f953867c4b82442627
Reviewed-on: http://gerrit.cloudera.org:8080/24078
Tested-by: Impala Public Jenkins <[email protected]>
Reviewed-by: Quanlong Huang <[email protected]>
> Calcite Planner: Calcite treating exponent notation as double
> -------------------------------------------------------------
>
> Key: IMPALA-14412
> URL: https://issues.apache.org/jira/browse/IMPALA-14412
> Project: IMPALA
> Issue Type: Sub-task
> Reporter: Steve Carlin
> Priority: Major
>
> Calcite parses the APPROX_NUMERIC_LITERAL as a double. Impala needs the
> parse it as a decimal type.
> The query
> select avg(c) from (select cast(1e32 as decimal(38,0)) - cast(1 as
> decimal(38,0)) as c) t
> in
> [query_test/test_decimal_queries.py::TestDecimalExprs::test_exprs|https://jenkins.impala.io/view/all/job/calcite-report-prototype/320/artifact/Impala/calcite_report/html/query_test_test_decimal_queries.py/TestDecimalExprs_test_exprs/index.html]
> is failing.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]