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


##########
sql/core/src/test/scala/org/apache/spark/sql/jdbc/JDBCV2Suite.scala:
##########
@@ -1026,14 +1034,70 @@ class JDBCV2Suite extends QueryTest with 
SharedSparkSession with ExplainSuiteHel
             |AND cast(dept as short) > 1
             |AND cast(bonus as decimal(20, 2)) > 1200""".stripMargin)
         checkFiltersRemoved(df6, ansiMode)
-        val expectedPlanFragment8 = if (ansiMode) {
+        val expectedPlanFragment6 = if (ansiMode) {
           "PushedFilters: [BONUS IS NOT NULL, DEPT IS NOT NULL, " +
             "CAST(BONUS AS string) LIKE '%30%', CAST(DEPT AS byte) > 1, ...,"
         } else {
           "PushedFilters: [BONUS IS NOT NULL, DEPT IS NOT NULL],"
         }
-        checkPushedInfo(df6, expectedPlanFragment8)
+        checkPushedInfo(df6, expectedPlanFragment6)
         checkAnswer(df6, Seq(Row(2, "david", 10000, 1300, true)))
+
+        val df7 = sql("SELECT name FROM h2.test.datetime WHERE " +
+          "dayofyear(date1) > 100 AND dayofmonth(date1) > 10 ")
+        checkFiltersRemoved(df7)
+        val expectedPlanFragment7 =
+          "PushedFilters: [DATE1 IS NOT NULL, EXTRACT(DOY FROM DATE1) > 100, " 
+
+            "EXTRACT(DAY FROM DATE1) > 10]"
+        checkPushedInfo(df7, expectedPlanFragment7)
+        checkAnswer(df7, Seq(Row("amy"), Row("alex")))
+
+        val df8 = sql("SELECT name FROM h2.test.datetime WHERE " +
+          "year(date1) = 2022 AND quarter(date1) = 2 AND month(date1) = 5")
+        checkFiltersRemoved(df8)
+        val expectedPlanFragment8 =
+          "[DATE1 IS NOT NULL, EXTRACT(YEAR FROM DATE1) = 2022, " +
+            "EXTRACT(QUARTER FROM DATE1) = 2, EXTRACT(MON...,"

Review Comment:
   can we update the test framework to not truncate it? otherwise the test 
coverage is not good enough.



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