hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vineet Garg (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-17553) CBO wrongly type cast decimal literal to int
Date Thu, 05 Oct 2017 23:24:00 GMT

    [ https://issues.apache.org/jira/browse/HIVE-17553?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16193898#comment-16193898
] 

Vineet Garg commented on HIVE-17553:
------------------------------------

This happens due to RexBuilder::makeExactLiteral creating Integer/BigInteger if scale happens
to be zero. Hive probably need to create the type own its own and pass it to makeExactLiteral
to preserve the type.

> CBO wrongly type cast decimal literal to int
> --------------------------------------------
>
>                 Key: HIVE-17553
>                 URL: https://issues.apache.org/jira/browse/HIVE-17553
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Planning
>            Reporter: Vineet Garg
>
> {code:sql}explain select 100.000BD from f{code}
> {noformat}
> STAGE PLANS:
>   Stage: Stage-0
>     Fetch Operator
>       limit: -1
>       Processor Tree:
>         TableScan
>           alias: f
>           Select Operator
>             expressions: 100 (type: int)
>             outputColumnNames: _col0
>             ListSink
> {noformat}
> Notice that the expression 100.000BD is of type int instead of decimal.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message