szehon-ho commented on code in PR #57235:
URL: https://github.com/apache/spark/pull/57235#discussion_r3582504099


##########
sql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2Suite.scala:
##########
@@ -1351,6 +1354,20 @@ class DataSourceV2Suite extends SharedSparkSession with 
AdaptiveSparkPlanHelper
       "pushedFilters should contain the pushed filter on column i")
   }
 
+  test("catalyst filter pushdown skips non-deterministic filters") {

Review Comment:
   Good suggestion, thanks! I've added an assertion that the non-deterministic 
filter (`rand() > 0.5`) is retained as a post-scan `Filter` in the optimized 
plan, so the post-scan retention is now verified directly, not just its absence 
from `pushedFilters`. I went with the plan assertion rather than a 
`checkAnswer` since the answer is non-deterministic



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