[
https://issues.apache.org/jira/browse/CALCITE-4745?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
keaton drebes updated CALCITE-4745:
-----------------------------------
Description:
Currently, RelDataTypeSystemImpl.deriveAvgAggType returns the type of the input
argument.
This is obviously incorrect, AVG(A) where A has values [0, 1] should return .5,
which is not an integer. This issue effects all SqlAggFunction's, since they
ultimately use deriveAvgAggType for type inference.
PR here: [https://github.com/apache/calcite/pull/2498]
was:
Currently, RelDataTypeSystemImpl.deriveAvgAggType returns the type of the input
argument.
This is obviously incorrect, AVG(A) where A has values [0, 1] should return .5,
which is not an integer. This issue effects all SqlAggFunction's, since they
ultimately use deriveAvgAggType for type inference.
PR here: https://github.com/apache/calcite/pull/2498
> RelDataTypeSystemImpl.deriveAvgAggType typing error
> ---------------------------------------------------
>
> Key: CALCITE-4745
> URL: https://issues.apache.org/jira/browse/CALCITE-4745
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.27.0
> Reporter: keaton drebes
> Priority: Trivial
> Fix For: 1.27.0
>
>
> Currently, RelDataTypeSystemImpl.deriveAvgAggType returns the type of the
> input argument.
> This is obviously incorrect, AVG(A) where A has values [0, 1] should return
> .5, which is not an integer. This issue effects all SqlAggFunction's, since
> they ultimately use deriveAvgAggType for type inference.
>
> PR here: [https://github.com/apache/calcite/pull/2498]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)