wangyum opened a new pull request #31573:
URL: https://github.com/apache/spark/pull/31573


   ### What changes were proposed in this pull request?
   
   This pr pushdown scalar-subquery filter to FileSourceScan. For example:
   ```scala
   sql("CREATE TABLE t1 using parquet AS SELECT id AS a, id AS b FROM 
range(500000000L)")
   sql("CREATE TABLE t2 using parquet AS SELECT id AS d FROM range(20)")
   sql("SELECT * FROM t1 where b = (select max(d) from t2)").show
   ```
   Before this pr | After this pr
   -- | --
   
![image](https://user-images.githubusercontent.com/5399861/108058404-f4396080-708e-11eb-8e9c-0f2b5e98967c.png)
 | 
![image](https://user-images.githubusercontent.com/5399861/108058416-fb606e80-708e-11eb-8886-7f1ee2e0bdbb.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.

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