cloud-fan commented on code in PR #36593:
URL: https://github.com/apache/spark/pull/36593#discussion_r910232200


##########
sql/core/src/test/scala/org/apache/spark/sql/jdbc/JDBCV2Suite.scala:
##########
@@ -917,6 +994,49 @@ class JDBCV2Suite extends QueryTest with 
SharedSparkSession with ExplainSuiteHel
     }
   }
 
+  test("scan with filter push-down with UDF") {
+    JdbcDialects.unregisterDialect(H2Dialect)
+    try {
+      JdbcDialects.registerDialect(testH2Dialect)
+      val df1 = sql("SELECT * FROM h2.test.people where h2.my_strlen(name) > 
2")
+      checkFiltersRemoved(df1)
+      checkPushedInfo(df1, "PushedFilters: [char_length(NAME) > 2],")
+      checkAnswer(df1, Seq(Row("fred", 1), Row("mary", 2)))
+
+      val df2 = sql("SELECT * FROM h2.test.people where h2.my_strlen(name) > 
4")

Review Comment:
   nit: I don't think it worth a new test case for changing `h2.my_strlen(name) 
> 2` to `h2.my_strlen(name) > 4`. Can we remove this `df2` 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: [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