xinrong-meng commented on code in PR #45796:
URL: https://github.com/apache/spark/pull/45796#discussion_r1546827241


##########
python/pyspark/sql/functions/builtin.py:
##########
@@ -20166,6 +20166,72 @@ def try_reflect(*cols: "ColumnOrName") -> Column:
     return _invoke_function_over_seq_of_columns("try_reflect", cols)
 
 
+@_try_remote_functions
+def try_cast(
+    col: "ColumnOrName",
+    dataType: Union[DataType, str],
+) -> Column:
+    """
+    This is a special version of `cast` that performs the same operation, but 
returns a NULL
+    value instead of raising an error if the invoke method thrown exception.

Review Comment:
   nit: thrown -> throws



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