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


##########
python/pyspark/sql/functions.py:
##########
@@ -9929,6 +10078,26 @@ def map_zip_with(
     return _invoke_higher_order_function("MapZipWith", [col1, col2], [f])
 
 
+def str_to_map(
+    col1: "ColumnOrName",
+    col2: Union["ColumnOrName", str],
+    col3: Union["ColumnOrName", str],
+) -> Column:

Review Comment:
   The problem here is that it becomes a bit ambiguous if we support to take 
actual columns instead of just literals in `col2` and `col3`, which actually 
happens time to time. Or, e.g., if `col2` and `col3` support other types. Maybe 
we should just keep the signature as `ColumnOrName`.
   
   `sentences` is one example.



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