cloud-fan commented on code in PR #36521:
URL: https://github.com/apache/spark/pull/36521#discussion_r872154238
##########
sql/core/src/main/scala/org/apache/spark/sql/jdbc/JdbcDialects.scala:
##########
@@ -240,8 +240,31 @@ abstract class JdbcDialect extends Serializable with
Logging{
getJDBCType(dataType).map(_.databaseTypeDefinition).getOrElse(dataType.typeName)
s"CAST($l AS $databaseTypeDefinition)"
}
+
+ override def visitSQLFunction(funcName: String, inputs: Array[String]):
String = {
+ if (isSupportedFunction(funcName)) {
+ s"""$funcName(${inputs.mkString(", ")})"""
+ } else {
+ throw QueryCompilationErrors.noSuchFunctionError(dialectName, funcName)
Review Comment:
This is not a user-facing error, right? The framework will catch the error
and give up the pushdown. I think just throwing `UnsupportedException` is good
enough here, with a comment to explain how it will be handled and is not
user-facing.
--
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]