You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/02/11 07:55:14 UTC

[GitHub] [spark] ulysses-you commented on a change in pull request #35487: [SPARK-38182][SQL] Fix NoSuchElementException if pushed filter does not contain any references

ulysses-you commented on a change in pull request #35487:
URL: https://github.com/apache/spark/pull/35487#discussion_r804420141



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala
##########
@@ -4281,6 +4281,18 @@ class SQLQuerySuite extends QueryTest with SharedSparkSession with AdaptiveSpark
         Row(2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22) :: Nil)
     }
   }
+
+  test("SPARK-38182: Fix NoSuchElementException if pushed filter does not contain any " +
+    "references") {
+    withTable("t") {
+      withSQLConf(SQLConf.OPTIMIZER_EXCLUDED_RULES.key ->
+        "org.apache.spark.sql.catalyst.optimizer.BooleanSimplification") {
+
+        sql("CREATE TABLE t (c1 int) USING PARQUET")
+        checkAnswer(sql("SELECT * FROM t WHERE c1 = 1 AND 2 > 1"), Nil)

Review comment:
       It can not trigger this bug since we can not push down indeterministic filter. see code in `FileSourceStrategy`
   
   https://github.com/apache/spark/blob/e0bc977dd0dd378665da431d4a2497e05ae90cf7/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/FileSourceStrategy.scala#L157-L173




-- 
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-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org