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

Fix the precedence rule for set operations.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.3.1
    • 2.4.0
    • SQL
    • None

    Description

      Currently the set operations INTERSECT, UNION and EXCEPT are assigned the same precedence. We need to change to make sure INTERSECT is given higher precedence than UNION and EXCEPT. UNION and EXCEPT should be evaluated in the order they appear in the query from left to right.

      Given this will result in a change in behavior, we need to keep it under a config.

      Here is a reference :
      https://docs.microsoft.com/en-us/sql/t-sql/language-elements/set-operators-except-and-intersect-transact-sql?view=sql-server-2017

      Attachments

        Activity

          People

            dkbiswal Dilip Biswal
            dkbiswal Dilip Biswal
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: