zhengruifeng commented on code in PR #46045:
URL: https://github.com/apache/spark/pull/46045#discussion_r1566741860


##########
python/pyspark/sql/functions/builtin.py:
##########
@@ -10985,7 +10994,9 @@ def split(str: "ColumnOrName", pattern: str, limit: int 
= -1) -> Column:
     >>> df.select(split(df.s, '[ABC]', -1).alias('s')).collect()
     [Row(s=['one', 'two', 'three', ''])]
     """
-    return _invoke_function("split", _to_java_column(str), pattern, limit)
+    pattern = pattern if isinstance(pattern, Column) else lit(pattern)
+    limit = lit(limit) if isinstance(limit, int) else limit

Review Comment:
   yea, we can use it for `pattern`



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