caicancai commented on code in PR #44357:
URL: https://github.com/apache/spark/pull/44357#discussion_r1439040233


##########
connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/v2/MySQLIntegrationSuite.scala:
##########
@@ -163,4 +164,29 @@ class MySQLIntegrationSuite extends 
DockerJDBCIntegrationV2Suite with V2JDBCTest
       assert(sql(s"SELECT char_length(c1) from $tableName").head().get(0) === 
65536)
     }
   }
+
+  test("SPARK-46408: Scan with filter push-down with date time functions") {
+    val tableName = catalogName + ".datetime"
+    withTable(tableName) {
+      sql(s"CREATE TABLE $tableName(name varchar(32), date1 DATE, time1 
TIMESTAMP)")
+      val df1 = sql(s"SELECT name FROM $tableName where " +
+        "date_add(date1, 1) = '2022-05-20'")
+      checkFilterPushed(df1)
+      val df2 = sql(s"SELECT name FROM $tableName where " +
+        "date_sub(date1, 1) = '2022-05-20'")
+      checkFilterPushed(df2)
+    }
+  }
+
+  private def checkFilterPushed(df: DataFrame, pushed: Boolean = true): Unit = 
{

Review Comment:
   But it is private



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