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/07/05 05:55:02 UTC
[GitHub] [spark] chenzhx commented on a diff in pull request #36663: [SPARK-38899][SQL]DS V2 supports push down datetime functions
chenzhx commented on code in PR #36663:
URL: https://github.com/apache/spark/pull/36663#discussion_r913409855
##########
sql/core/src/test/scala/org/apache/spark/sql/jdbc/JDBCV2Suite.scala:
##########
@@ -1026,14 +1035,86 @@ 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, ...,"
+ "CAST(BONUS AS string) LIKE '%30%', CAST(DEPT AS byte) > 1, CAST(DEPT AS short) > 1, " +
+ "CAST(BONUS AS decimal(20,2)) > 1200.00]"
} 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 ")
Review Comment:
OK
--
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