abhiips07 commented on code in PR #47666:
URL: https://github.com/apache/spark/pull/47666#discussion_r1710814500


##########
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")

Review Comment:
   `private val supportedAggregateFunctions: Set[String] = 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", "DATE_TRUNC"
   )`
   
   This approach simplifies the code and keeps everything in one place. Let me 
know what you think!
   



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

Reply via email to