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

Incorrect result of MINUS in spark sql.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.4.8, 3.0.3, 3.1.3
    • None
    • SQL
    • None

    Description

      sql("""
      with va as (
        select '123' id, 'a' name
         union all
        select '123' id, 'b' name
      )
      select '123' id, 'a' name from va t where t.name = 'a'
       minus 
      select '123' id, 'a' name from va s where s.name = 'b'
      """).show
      -----+

      id name

      -----+

      123   a

      -----+

      which is expected to be empty result set.

      Attachments

        Activity

          People

            Unassigned Unassigned
            kernelforce Kernel Force
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: