zhengruifeng commented on code in PR #41653:
URL: https://github.com/apache/spark/pull/41653#discussion_r1234879162


##########
sql/core/src/main/scala/org/apache/spark/sql/functions.scala:
##########
@@ -1872,6 +1872,70 @@ object functions {
    */
   def sqrt(colName: String): Column = sqrt(Column(colName))
 
+  /**
+   * Returns the sum of `left` and `right` and the result is null on overflow. 
The acceptable
+   * input types are the same with the `+` operator.
+   *
+   * @group math_funcs
+   * @since 3.5.0
+   */
+  def try_add(left: Column, right: Column): Column = {
+    call_udf("try_add", left, right)

Review Comment:
   sorry, let's directly use `UnresolvedFunction` for this case
   
   since there were already some similar cases in `functions`, e.g.
   
   
https://github.com/apache/spark/blob/476c58ed26a1155fabe5afe1eb502bb992f31954/sql/core/src/main/scala/org/apache/spark/sql/functions.scala#L3454-L3463



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