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

Fix the precedence rule for set operations.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.1
    • Fix Version/s: 2.4.0
    • Component/s: SQL
    • Labels:
      None
    • Target Version/s:

      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

            • Assignee:
              dkbiswal Dilip Biswal
              Reporter:
              dkbiswal Dilip Biswal
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: