You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Dongjoon Hyun (Jira)" <ji...@apache.org> on 2022/02/14 02:24:00 UTC

[jira] [Resolved] (SPARK-38175) Clean up useless parameters of castDecimalToIntegralTypeCode in Cast.scala

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

Dongjoon Hyun resolved SPARK-38175.
-----------------------------------
    Fix Version/s: 3.3.0
       Resolution: Fixed

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

> Clean up useless parameters of castDecimalToIntegralTypeCode in Cast.scala
> --------------------------------------------------------------------------
>
>                 Key: SPARK-38175
>                 URL: https://issues.apache.org/jira/browse/SPARK-38175
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 3.3.0
>            Reporter: Yang Jie
>            Assignee: Yang Jie
>            Priority: Minor
>             Fix For: 3.3.0
>
>
> The private method `castDecimalToIntegralTypeCode` in Cast.scala as follows:
>  
> {code:java}
> private[this] def castDecimalToIntegralTypeCode(
>       ctx: CodegenContext,
>       integralType: String,
>       catalogType: String): CastFunction = {
>     if (ansiEnabled) {
>       (c, evPrim, evNull) => code"$evPrim = $c.roundTo${integralType.capitalize}();"
>     } else {
>       (c, evPrim, evNull) => code"$evPrim = $c.to${integralType.capitalize}();"
>     }
>   } {code}
> `ctx` and `catalogType` are useless
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

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