Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-37631

Code clean up on promoting strings in math functions

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 3.3.0
    • 3.3.0
    • SQL
    • None

    Description

      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`

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Gengliang.Wang Gengliang Wang
            Gengliang.Wang Gengliang Wang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment