dtenedor commented on code in PR #36365:
URL: https://github.com/apache/spark/pull/36365#discussion_r861163608


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/numberFormatExpressions.scala:
##########
@@ -168,3 +168,142 @@ case class TryToNumber(left: Expression, right: 
Expression)
       newRight: Expression): TryToNumber =
     copy(left = newLeft, right = newRight)
 }
+
+/**
+ * A function that converts decimal values to strings, returning NULL if the 
decimal value fails to
+ * match the format string.
+ */
+@ExpressionDescription(
+  usage = """
+    _FUNC_(numberExpr, formatExpr) - Convert `numberExpr` to a string based on 
the `formatExpr`.
+      Throws an exception if the conversion fails. The format follows the same 
semantics as the
+      to_number function.

Review Comment:
   Good idea, done. Making some edits helps the reader understand how each part 
of the result string is generated (as opposed to consumed).



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