beliefer commented on code in PR #47666:
URL: https://github.com/apache/spark/pull/47666#discussion_r1749666429
##########
sql/core/src/main/scala/org/apache/spark/sql/jdbc/PostgresDialect.scala:
##########
@@ -47,7 +47,10 @@ private case class PostgresDialect()
private val supportedAggregateFunctions = Set("MAX", "MIN", "SUM", "COUNT",
"AVG",
"VAR_POP", "VAR_SAMP", "STDDEV_POP", "STDDEV_SAMP", "COVAR_POP",
"COVAR_SAMP", "CORR",
"REGR_INTERCEPT", "REGR_R2", "REGR_SLOPE", "REGR_SXY")
- private val supportedFunctions = supportedAggregateFunctions
+ private val supportedDatetimeFunctions = Set("DATE_TRUNC")
+ private val supportedFunctions =
+ supportedAggregateFunctions ++
+ supportedDatetimeFunctions
Review Comment:
The aggregate functions is very different from others(string functions,
datetime functions and so on) and already defined a lot of aggregate functions.
We can define `supportedDatetimeFunctions` in future if need.
--
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]