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

Put removal of '!' as a synonym for 'NOT' on a keyword level under a config

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

Details

    Description

      Recently we dissolved the lexer equivalence between '!' and 'NOT'.
      ! is a prefix operator and a synonym for NOT only in that case.
      But NOT is used in many more cases in the grammar.
      Given that there are a handful of known scenearios where users have exploited the undocumented loophole it's best to add a config.
      Usage found so far is:

      `c1 ! IN(1, 2)`
      `c1 ! BETWEEN 1 AND 2`
      `c1 ! LIKE 'a%'`

       But there are worse cases:
      c1 IS ! NULL
      CREATE TABLE T(c1 INT ! NULL)
      or even
      CREATE TABLE IF ! EXISTS T(c1 INT)

      Attachments

        Activity

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

          People

            srielau Serge Rielau
            srielau Serge Rielau
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment