amaliujia commented on code in PR #40041:
URL: https://github.com/apache/spark/pull/40041#discussion_r1107570493


##########
connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/functions.scala:
##########
@@ -44,6 +44,28 @@ object functions {
    */
   def col(colName: String): Column = Column(colName)
 
+
+  /**
+   * Aggregate function: returns the maximum value of the expression in a 
group.
+   *
+   * @group agg_funcs
+   * @since 3.4.0
+   */
+  def max(e: Column): Column = withUnresolvedFunction("max", e.expr)
+
+  private def withUnresolvedFunction(
+      funcName: String,
+      expr: proto.Expression,
+      isDistinct: Boolean = false): Column = {
+    Column { builder =>
+      val funcBuilder = proto.Expression.UnresolvedFunction.newBuilder()
+      funcBuilder.setFunctionName(funcName)
+      funcBuilder.addArguments(expr)
+      funcBuilder.setIsDistinct(isDistinct)
+      builder.setUnresolvedFunction(funcBuilder)

Review Comment:
   This becomes unused to remove.



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