beliefer commented on code in PR #41505:
URL: https://github.com/apache/spark/pull/41505#discussion_r1224093275
##########
python/pyspark/sql/functions.py:
##########
@@ -7906,6 +8019,122 @@ def translate(srcCol: "ColumnOrName", matching: str,
replace: str) -> Column:
return _invoke_function("translate", _to_java_column(srcCol), matching,
replace)
+@try_remote_functions
+def to_binary(col: "ColumnOrName", format: Optional["ColumnOrName"] = None) ->
Column:
+ """
+ Converts the input `col` to a binary value based on the supplied `format`.
+ The `format` can be a case-insensitive string literal of "hex", "utf-8",
"utf8",
+ or "base64". By default, the binary format for conversion is "hex" if
+ `format` is omitted. The function returns NULL if at least one of the
+ input parameters is NULL.
+
+ .. versionchanged:: 3.5.0
+ Supports Spark Connect.
Review Comment:
It seems we not need this comment. Because this is a new API. cc
@HyukjinKwon @zhengruifeng
--
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]