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


##########
sql/api/src/main/scala/org/apache/spark/sql/Column.scala:
##########
@@ -1424,6 +1424,23 @@ class Column(val node: ColumnNode) extends Logging with 
TableValuedFunctionArgum
    */
   def outer(): Column = Column(internal.LazyExpression(node))
 
+  /**
+   * Concise syntax for chaining custom transformations.
+   * {{{
+   *   def addPrefix(c: Column): Column = concat(lit("prefix_"), c)
+   *
+   *   df.select($"name".transform(addPrefix))
+   *
+   *   // Chaining multiple transformations
+   *   def uppercase(c: Column): Column = upper(c)
+   *   df.select($"name".transform(addPrefix).transform(uppercase))

Review Comment:
   ```suggestion
      *   df.select($"name".transform(addPrefix).transform(upper))
   ```



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