dongjoon-hyun commented on code in PR #37335:
URL: https://github.com/apache/spark/pull/37335#discussion_r932701092


##########
python/pyspark/sql/dataframe.py:
##########
@@ -3237,17 +3237,18 @@ def drop(self, *cols: "ColumnOrName") -> "DataFrame":  
# type: ignore[misc]
         """
         if len(cols) == 1:
             col = cols[0]
-            if isinstance(col, str):
-                jdf = self._jdf.drop(col)
-            elif isinstance(col, Column):
-                jdf = self._jdf.drop(col._jc)
-            else:
+            if not isinstance(col, (str, Column)):
                 raise TypeError("col should be a string or a Column")
+            jdf = self._jdf.drop(_to_java_column(col))

Review Comment:
   This code path change is irrelevant to this PR's goal, `Support multiple 
column drop`, isn't it?
   If this is a bug, it's worth to have another JIRA and make a PR, 
@santosh-d3vpl3x .



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