khalidmammadov commented on code in PR #39785:
URL: https://github.com/apache/spark/pull/39785#discussion_r1090057753


##########
python/pyspark/sql/dataframe.py:
##########
@@ -3795,8 +3868,11 @@ def dropDuplicates(self, subset: Optional[List[str]] = 
None) -> "DataFrame":
         |Alice|  5|    80|
         +-----+---+------+
         """
-        if subset is not None and (not isinstance(subset, Iterable) or 
isinstance(subset, str)):
-            raise TypeError("Parameter 'subset' must be a list of columns")
+        if subset is not None and not isinstance(subset, (list, tuple)):

Review Comment:
   So, previously it was checking that it must be Iterable and not String, now 
it fails only when it is not List or Tuple. Hence means it's Ok to pass String 
and Tupple now?



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