cloud-fan commented on code in PR #36593:
URL: https://github.com/apache/spark/pull/36593#discussion_r879461726


##########
sql/core/src/main/scala/org/apache/spark/sql/jdbc/JdbcDialects.scala:
##########
@@ -305,6 +318,34 @@ abstract class JdbcDialect extends Serializable with 
Logging{
     }
   }
 
+  /**
+   * Converts aggregate function of dialect to String representing a SQL 
expression.
+   * @param aggFunction The aggregate function of dialect to be converted.
+   * @return Converted value.
+   */
+  @Since("3.4.0")
+  protected def compileDialectAggregate(aggFunction: AggregateFunc): 
Option[String] = None
+
+  /**
+   * Converts user defined aggregate function to String representing a SQL 
expression.
+   * @param aggFunction The user defined aggregate function to be converted.
+   * @return Converted value.
+   */
+  @Since("3.4.0")
+  protected def compileUDAF(aggFunction: AggregateFunc): Option[String] = None
+
+  /**
+   * Register user defined function into JDBC catalog.
+   * @param catalog The JDBC catalog.
+   * @param ident The identifier of user defined function.
+   * @param fn The user-defined function.
+   * @return The user-defined function.
+   */
+  def registerFunction(

Review Comment:
   This looks like a weird API design. Why not ask dialect to return a 
`Array[(Identifier, UnboundFunction)]`?



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

Reply via email to