maropu commented on a change in pull request #31207:
URL: https://github.com/apache/spark/pull/31207#discussion_r566570144



##########
File path: python/pyspark/sql/functions.py
##########
@@ -91,13 +92,58 @@ def lit(col):
     Creates a :class:`Column` of literal value.
 
     .. versionadded:: 1.3.0
+    .. versionchanged:: 3.2.0
+        Added support for complex type literals.
+
+    Parameters
+    ----------
+    col : bool, float, int, str, datetime.date, datetime.datetime, dict, list, 
tuple
+        Object to be converted into :class:`Column`.
+
+        If it is a collection, conversion will be applied recursively. In such 
case,
+        all stored values should be of compatible types.
+
+        I `col` is already a :class:`Column`, it will be returned unmodified.

Review comment:
       ditto: "The passed in object is returned directly if it is already a 
:class:`Column`."
   
   
https://github.com/apache/spark/blob/72b7f8abfb60d0008f1f9bed94ce1c367a7d7cce/sql/core/src/main/scala/org/apache/spark/sql/functions.scala#L107




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

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