IvanK-db commented on code in PR #47666:
URL: https://github.com/apache/spark/pull/47666#discussion_r1756458910
##########
connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/v2/PostgresIntegrationSuite.scala:
##########
@@ -123,4 +132,49 @@ class PostgresIntegrationSuite extends
DockerJDBCIntegrationV2Suite with V2JDBCT
)
}
}
+
+ test("SPARK-49162: Push down date_trunc function") {
+ def testDateTruncPushdown(format: String, expectedResult: Set[Row]): Unit
= {
+ val df = sql(
+ s"""
+ SELECT DATE_TRUNC('$format', time), COUNT(*)
+ | FROM $catalogName.datetime_table
+ | GROUP BY 1
Review Comment:
The original query that was used to point out the function wasn't pushed
down was similar to this one so i modeled the test case after it. Should we
remove the aggregate test cases?
--
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]