cloud-fan commented on code in PR #37047:
URL: https://github.com/apache/spark/pull/37047#discussion_r915953731
##########
sql/core/src/main/scala/org/apache/spark/sql/jdbc/JdbcDialects.scala:
##########
@@ -253,6 +253,19 @@ abstract class JdbcDialect extends Serializable with
Logging {
}
}
+ override def visitAggregateFunction(
+ funcName: String, isDistinct: Boolean, inputs: Array[String]): String
= {
+ if (isSupportedFunction(funcName)) {
+ super.visitAggregateFunction(
+ dialectFunctionName(funcName).getOrElse(funcName), isDistinct,
inputs)
Review Comment:
This is a bit verbose. Can we make `dialectFunctionName` return string
directly with default implementation
```
protected def dialectFunctionName(funcName: String): String = String
```
--
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]