mihailom-db commented on code in PR #48500:
URL: https://github.com/apache/spark/pull/48500#discussion_r1808542771


##########
python/pyspark/sql/tests/test_functions.py:
##########
@@ -333,6 +333,14 @@ def test_rand_functions(self):
         rndn2 = df.select("key", F.randn(0)).collect()
         self.assertEqual(sorted(rndn1), sorted(rndn2))
 
+    def test_try_parse_url(self):

Review Comment:
   Could we also add a case here that returns null? This is to make sure python 
works as well with invalid urls.



##########
python/pyspark/sql/functions/builtin.py:
##########
@@ -13090,6 +13090,108 @@ def substr(
         return _invoke_function_over_columns("substr", str, pos)
 
 
+@_try_remote_functions
+def try_parse_url(
+    url: "ColumnOrName", partToExtract: "ColumnOrName", key: 
Optional["ColumnOrName"] = None
+) -> Column:
+    """
+    URL function: Extracts a specified part from a URL. If a key is provided,

Review Comment:
   Could you update this description to give the similar message as other try 
functions?



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