itholic commented on code in PR #39387:
URL: https://github.com/apache/spark/pull/39387#discussion_r1070233047


##########
python/pyspark/sql/functions.py:
##########
@@ -172,7 +173,9 @@ def lit(col: Any) -> Column:
         return col
     elif isinstance(col, list):
         if any(isinstance(c, Column) for c in col):
-            raise ValueError("lit does not allow a column in a list")
+            raise PySparkException(

Review Comment:
   Yeah, it's right. We should classify the exception more detail per Python 
built-in exceptions.
   
   Let me do it in follow-up.



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