cloud-fan commented on code in PR #38746: URL: https://github.com/apache/spark/pull/38746#discussion_r1028445696
########## sql/core/src/test/scala/org/apache/spark/sql/FileBasedDataSourceSuite.scala: ########## @@ -1074,6 +1074,24 @@ class FileBasedDataSourceSuite extends QueryTest checkAnswer(df, Row("v1", "v2")) } } + + test("SPARK-41017: filter pushdown with nondeterministic predicates") { + withTempPath { path => + val pathStr = path.getCanonicalPath + spark.range(10).write.parquet(pathStr) + Seq("parquet", "").foreach { useV1SourceList => + withSQLConf(SQLConf.USE_V1_SOURCE_LIST.key -> useV1SourceList) { + val scan = spark.read.parquet(pathStr) + val df = scan.where($"id" > 5 && rand() > 0.5) Review Comment: ```suggestion val df = scan.where(rand() > 0.5 && $"id" > 5) ``` -- 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