Will Du created SPARK-32983:
-------------------------------

             Summary: Spark SQL INTERSECT ALL does not keep all rows.
                 Key: SPARK-32983
                 URL: https://issues.apache.org/jira/browse/SPARK-32983
             Project: Spark
          Issue Type: Bug
          Components: SQL
    Affects Versions: 3.0.1, 3.0.0, 2.4.6
            Reporter: Will Du


Spark SQL INTERSECT ALL should keep all rows. But, it actually remove 
replicated like Spark SQL INTERSECT.

with base as (

select 1 as id union all select 2 as id

), a as (

select 1 as id union all select 3 as id)

select * from a INTERSECT ALL select * from base;

 

with base as (

select 1 as id union all select 2 as id

), a as (

select 1 as id union all select 3 as id)

select * from a INTERSECT select * from base;

 

Both the above queries return one record that is 1.

I think the 1st query should return

1

1



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to