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/12/13 15:35:00 UTC

[jira] [Commented] (SPARK-37631) Code clean up on promoting strings in math functions

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

Apache Spark commented on SPARK-37631:
--------------------------------------

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

> Code clean up on promoting strings in math functions
> ----------------------------------------------------
>
>                 Key: SPARK-37631
>                 URL: https://issues.apache.org/jira/browse/SPARK-37631
>             Project: Spark
>          Issue Type: Task
>          Components: SQL
>    Affects Versions: 3.3.0
>            Reporter: Gengliang Wang
>            Assignee: Gengliang Wang
>            Priority: Trivial
>
> There is some similar logic in promoting string to double type in TypeCoercion and AnsiTypeCoercion.
> We can change the function Abs/UnaryMinus/UnaryPositive to extend 
> ImplicitCastInputTypes so that string will implicitly cast to Double type in the rule `ImplicitTypeCasts`.  We don't have to repeat the logic in rule `PromoteStrings` or `PromoteStringLiterals`



--
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