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

   ### What changes were proposed in this pull request?
   Makes DPP support the pruning side has `Union`. For example:
   
   ```sql
   SELECT f.store_id,
          f.date_id,
          s.state_province
   FROM (SELECT 4 AS store_id,
                  date_id,
                  product_id
         FROM   fact_sk
         WHERE  date_id >= 1300
         UNION ALL
         SELECT   store_id,
                  date_id,
                  product_id
         FROM   fact_stats
         WHERE  date_id <= 1000) f
   JOIN dim_store s
   ON f.store_id = s.store_id
   WHERE s.country IN ('US', 'NL')
   ```
   
   After this PR: 
![image](https://user-images.githubusercontent.com/5399861/169023481-80875e00-249b-48dc-adcb-e218756adbe7.png)
   
   ### Why are the changes needed?
   Improve query performance.
   
   ### Does this PR introduce _any_ user-facing change?
   No.
   
   ### How was this patch tested?
   Unit test.


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