You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Gengliang Wang (Jira)" <ji...@apache.org> on 2022/07/19 09:04:00 UTC

[jira] [Resolved] (SPARK-39792) Add DecimalDivideWithOverflowCheck for decimal average

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

Gengliang Wang resolved SPARK-39792.
------------------------------------
    Fix Version/s: 3.4.0
       Resolution: Fixed

Issue resolved by pull request 37207
[https://github.com/apache/spark/pull/37207]

> Add DecimalDivideWithOverflowCheck for decimal average
> ------------------------------------------------------
>
>                 Key: SPARK-39792
>                 URL: https://issues.apache.org/jira/browse/SPARK-39792
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 3.4.0
>            Reporter: XiDuo You
>            Assignee: XiDuo You
>            Priority: Major
>             Fix For: 3.4.0
>
>
> If the result data type is decimal, the Average will first calculate the result using the default precison and scale of divide, then cast to the result data type. We should do calculate and return the result data type directly so that we can avoid the precision loss. It can also save one unnecessary cast.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org