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

Refine ANSI error messages and remove 'To return NULL instead'

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete CommentsDelete
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.4.0
    • 3.3.0, 3.4.0
    • SQL
    • None

    Description

      Proposal: remove ‘To return NULL instead’ as this should not be the purpose and the user may not even aware it was returning NULLs.

      Example:

      Old:
      1[MAP_KEY_DOES_NOT_EXIST] Key 3 does not exist. To return NULL instead, use `try_element_at`. If necessary set "spark.sql.ansi.enabled" to "false" to bypass this error.2== SQL(line 1, position 8) ==3SELECT m[3] FROM VALUES(map(1, 'Hello', 2, ...4 ^^^^
      Proposed:
      1[MAP_KEY_DOES_NOT_EXIST] Key 3 does not exist in the map. Use `try_element_at` to tolerate a non-existent key and return NULL. If necessary set "spark.sql.ansi.enabled" to "false" to bypass this error.2== SQL(line 1, position 8) ==3SELECT m[3] FROM VALUES(map(1, 'Hello', 2, ...4 ^^^^

      Attachments

        Activity

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

          People

            vli-databricks Vitalii Li Assign to me
            vli-databricks Vitalii Li
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment