wangyum opened a new pull request, #36080: URL: https://github.com/apache/spark/pull/36080
### What changes were proposed in this pull request? This PR makes row-level runtime filtering support pruning side has window. For example: ```sql SELECT * FROM (SELECT *, Row_number() OVER ( partition BY c1 ORDER BY f1) rn FROM bf1) bf1 JOIN bf2 ON bf1.c1 = bf2.c2 WHERE bf2.a2 = 62 ``` After this PR: ``` == Optimized Logical Plan == Join Inner, (c1#45922 = c2#45928), Statistics(sizeInBytes=12.3 MiB) :- Window [row_number() windowspecdefinition(c1#45922, f1#45925 ASC NULLS FIRST, specifiedwindowframe(RowFrame, unboundedpreceding$(), currentrow$())) AS rn#45976], [c1#45922], [f1#45925 ASC NULLS FIRST], Statistics(sizeInBytes=3.7 KiB) : +- Filter (isnotnull(c1#45922) AND might_contain(scalar-subquery#45993 [], xxhash64(c1#45922, 42))), Statistics(sizeInBytes=3.3 KiB) : : +- Aggregate [bloom_filter_agg(xxhash64(c2#45928, 42), 1000000, 8388608, 0, 0) AS bloomFilter#45992], Statistics(sizeInBytes=108.0 B, rowCount=1) : : +- Project [c2#45928], Statistics(sizeInBytes=1278.0 B) : : +- Filter ((isnotnull(a2#45926) AND (a2#45926 = 62)) AND isnotnull(c2#45928)), Statistics(sizeInBytes=3.3 KiB) : : +- Relation default.bf2[a2#45926,b2#45927,c2#45928,d2#45929,e2#45930,f2#45931] parquet, Statistics(sizeInBytes=3.3 KiB) : +- Relation default.bf1[a1#45920,b1#45921,c1#45922,d1#45923,e1#45924,f1#45925] parquet, Statistics(sizeInBytes=3.3 KiB) +- Filter ((isnotnull(a2#45926) AND (a2#45926 = 62)) AND isnotnull(c2#45928)), Statistics(sizeInBytes=3.3 KiB) +- Relation default.bf2[a2#45926,b2#45927,c2#45928,d2#45929,e2#45930,f2#45931] parquet, Statistics(sizeInBytes=3.3 KiB) ``` ### 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org