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

Remove legacy example of round function with negative scale

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

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 3.2.2
    • 3.4.0
    • Documentation, SQL
    • None

    Description

      Run this sql in spark-sql: select round(1.233, -1);
      Error: org.apache.spark.sql.AnalysisException: Negative scale is not allowed: -1. You can use spark.sql.legacy.allowNegativeScaleOfDecimal=true to enable legacy mode to allow it.;

      But the document of round function implies that negative scale argument is allowed.

      Attachments

        Activity

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

          People

            panbingkun BingKun Pan
            taiyang-li liyang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment