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

Improve the implicit type conversion between numeric type and string to avoid precesion loss

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

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • 2.2.0
    • SQL
    • None

    Description

      Currently, Spark SQL will convert both numeric type and string into DoubleType, if the two children of a expression does not match (for example, comparing a LongType again StringType), this will cause precision loss in some cases.

      Some database does better job one this (for example, SQL Server [1]), we should follow that.

      [1] https://msdn.microsoft.com/en-us/library/ms191530.aspx

      Attachments

        Issue Links

        Activity

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

          People

            Unassigned Unassigned
            davies Davies Liu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment