panbingkun commented on code in PR #41505: URL: https://github.com/apache/spark/pull/41505#discussion_r1225029334
########## connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/functions.scala: ########## @@ -3393,6 +3421,81 @@ object functions { */ def upper(e: Column): Column = Column.fn("upper", e) + /** + * Converts the input `e` to a binary value based on the supplied `f`. The `f` can be a + * case-insensitive string literal of "hex", "utf-8", "utf8", or "base64". By default, the + * binary format for conversion is "hex" if `fmt` is omitted. The function returns NULL if at + * least one of the input parameters is NULL. + * + * @group string_funcs + * @since 3.5.0 + */ + def to_binary(e: Column, f: Column): Column = Column.fn("to_binary", e, f) + + /** + * Converts the input `e` to a binary value based on the format "hex". The function returns NULL + * if at least one of the input parameters is NULL. + * + * @group string_funcs + * @since 3.5.0 + */ + def to_binary(e: Column): Column = Column.fn("to_binary", e) + + // format: off Review Comment: Okay, let me reorganize this comment again. -- 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