peter-toth opened a new pull request #29053:
URL: https://github.com/apache/spark/pull/29053


   ### What changes were proposed in this pull request?
   This PR removes the empty child relations of a `Union`.
   
   E.g. the query `SELECT c FROM t UNION ALL SELECT c FROM t WHERE FALSE` has 
the following plan before this PR:
   ```
   == Physical Plan ==
   Union
   :- *(1) Project [value#219 AS c#222]
   :  +- *(1) LocalTableScan [value#219]
   +- LocalTableScan <empty>, [c#224]
   ```
   and after this PR:
   ```
   == Physical Plan ==
   *(1) Project [value#219 AS c#222]
   +- *(1) LocalTableScan [value#219]
   ```
   
   ### Why are the changes needed?
   To have a simpler plan.
   
   ### Does this PR introduce _any_ user-facing change?
   No.
   
   ### How was this patch tested?
   Added new UTs.
   


----------------------------------------------------------------
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.

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