HyukjinKwon commented on code in PR #37329:
URL: https://github.com/apache/spark/pull/37329#discussion_r932809698


##########
python/pyspark/sql/functions.py:
##########
@@ -3262,7 +3262,19 @@ def regexp_extract(str: "ColumnOrName", pattern: str, 
idx: int) -> Column:
     return _invoke_function("regexp_extract", _to_java_column(str), pattern, 
idx)
 
 
-def regexp_replace(str: "ColumnOrName", pattern: str, replacement: str) -> 
Column:
+@overload
+def regexp_replace(string: "ColumnOrName", pattern: str, replacement: str) -> 
Column:
+    ...
+
+
+@overload
+def regexp_replace(string: "ColumnOrName", pattern: Column, replacement: 
Column) -> Column:
+    ...
+
+
+def regexp_replace(
+    string: "ColumnOrName", pattern: Union[str, Column], replacement: 
Union[str, Column]

Review Comment:
   Can we write up `Parameters` section in the docs? And I think you can only 
keep `pattern: Union[str, Column]` and remove the ones above.



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