jchen5 opened a new pull request, #38432:
URL: https://github.com/apache/spark/pull/38432

   ## What changes were proposed in this pull request?
   
   Adds support for subquery decorrelation with UNION, INTERSECT, and EXCEPT on 
the correlation paths. For example:
   ```
   SELECT t1a, (
     SELECT sum(b) FROM (
       SELECT t2b as b FROM t2 WHERE  t2a = t1.t1a
       INTERSECT
       SELECT t3b as b FROM t3 WHERE  t3a = t1.t1a
   ))
   FROM t1
   ```
   
   ### Why are the changes needed?
   To improve subquery support in Spark.
   
   ### Does this PR introduce _any_ user-facing change?
   Before this change, queries like this would return an error like: 
`Decorrelate inner query through Union is not supported.`
   
   After this PR, this query can run successfully.
   
   ### How was this patch tested?
   Unit tests and SQL query tests.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to