IvanK-db commented on code in PR #47666: URL: https://github.com/apache/spark/pull/47666#discussion_r1745726023
########## 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: My thinking here is that we might have other datetime functions pushed down in the future and this provides a convenient grouping for them, similar to existing supportedAggregateFunctions -- 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