You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (Jira)" <ji...@apache.org> on 2021/08/01 13:47:00 UTC

[jira] [Commented] (SPARK-36373) DecimalPrecision only add necessary cast

    [ https://issues.apache.org/jira/browse/SPARK-36373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17391150#comment-17391150 ] 

Apache Spark commented on SPARK-36373:
--------------------------------------

User 'wangyum' has created a pull request for this issue:
https://github.com/apache/spark/pull/33602

> DecimalPrecision only add necessary cast
> ----------------------------------------
>
>                 Key: SPARK-36373
>                 URL: https://issues.apache.org/jira/browse/SPARK-36373
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 3.3.0
>            Reporter: Yuming Wang
>            Priority: Major
>
> For example:
> {noformat}
> EqualTo(AttributeReference("d1", DecimalType(5, 2))(), AttributeReference("d2", DecimalType(2, 1))())
> {noformat}
> It will add a useless cast to {{d1}}:
> {noformat}
> (cast(d1#6 as decimal(5,2)) = cast(d2#7 as decimal(5,2)))
> {noformat}



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

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