You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by "keaton drebes (Jira)" <ji...@apache.org> on 2021/08/17 20:55:00 UTC
[jira] [Created] (CALCITE-4745)
RelDataTypeSystemImpl.deriveAvgAggType typing error
keaton drebes created CALCITE-4745:
--------------------------------------
Summary: 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
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:
--
This message was sent by Atlassian Jira
(v8.3.4#803005)