You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (Jira)" <ji...@apache.org> on 2023/03/22 20:41:00 UTC

[jira] [Resolved] (CALCITE-5604) Avg function should infer correct data type

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

Julian Hyde resolved CALCITE-5604.
----------------------------------
    Resolution: Duplicate

Already made configurable by CALCITE-1945. Closing as duplicate.

> Avg function should infer correct data type
> -------------------------------------------
>
>                 Key: CALCITE-5604
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5604
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>            Reporter: logan.zheng
>            Priority: Minor
>
> Currently,when the avg input is int type,the return type is int type, but the correct type is float
> RelDataTypeSystemImpl
> {code:java}
> // code placeholder
> @Override public RelDataType deriveAvgAggType(RelDataTypeFactory typeFactory,
>     RelDataType argumentType) {
>   return argumentType;
> } {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)