You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Danny Chan (JIRA)" <ji...@apache.org> on 2019/08/07 01:24:00 UTC

[jira] [Closed] (CALCITE-3230) Explicit CASTs by user are not applied.

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

Danny Chan closed CALCITE-3230.
-------------------------------
    Assignee: Danny Chan

> Explicit CASTs by user are not applied.
> ---------------------------------------
>
>                 Key: CALCITE-3230
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3230
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>            Reporter: Pressenna
>            Assignee: Danny Chan
>            Priority: Major
>
> For some reason casting is not working correctly with aggregate functions.
> for example:
> {code:java}
> SELECT CAST(AVG(double_column) AS float) FROM foo GROUP BY group_coulmn;
> {code}
> does not apply the cast. We currently have to circumvent this by using following dummy construct.
> {code:java}
> SELECT CAST( (AVG(double_column) + 0.0) AS float) FROM foo GROUP BY group_coulmn;
> {code}
>  



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)