wForget commented on code in PR #45589:
URL: https://github.com/apache/spark/pull/45589#discussion_r1566701178


##########
sql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2Suite.scala:
##########
@@ -966,6 +966,22 @@ class DataSourceV2Suite extends QueryTest with 
SharedSparkSession with AdaptiveS
       )
     }
   }
+
+  test("SPARK-47463: Pushed down v2 filter with if expression") {
+    withTempView("t1") {
+      
spark.read.format(classOf[AdvancedDataSourceV2WithV2Filter].getName).load()
+        .createTempView("t1")
+      val df1 = sql(
+        s"""
+           |select * from
+           |(select if(i = 1, i, 0) as c from t1) t
+           |where t.c > 0

Review Comment:
   > I think `where if(i = 1, i, 0) > 0` is a valid SQL? BTW, please upper case 
the SQL keywords in the SQL statement.
   
   Indeed, thank you. I have changed.



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

Reply via email to