hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jesus Camacho Rodriguez (Jira)" <j...@apache.org>
Subject [jira] [Work started] (HIVE-22978) Fix decimal precision and scale inference for aggregate rewriting in Calcite
Date Thu, 05 Mar 2020 02:35:00 GMT

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

Work on HIVE-22978 started by Jesus Camacho Rodriguez.
------------------------------------------------------
> Fix decimal precision and scale inference for aggregate rewriting in Calcite
> ----------------------------------------------------------------------------
>
>                 Key: HIVE-22978
>                 URL: https://issues.apache.org/jira/browse/HIVE-22978
>             Project: Hive
>          Issue Type: Bug
>          Components: CBO
>            Reporter: Jesus Camacho Rodriguez
>            Assignee: Jesus Camacho Rodriguez
>            Priority: Major
>
> Calcite rules can do rewritings of aggregate functions, e.g., {{avg}} into {{sum/count}}.
When type of {{avg}} is decimal, inference of intermediate precision and scale for the division
is not done correctly. The reason is that we miss support for some types in method {{getDefaultPrecision}}
in {{HiveTypeSystemImpl}}. Additionally, {{deriveSumType}} should be overridden in {{HiveTypeSystemImpl}}
to abide by the Hive semantics for sum aggregate type inference.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message