santosh-d3vpl3x commented on code in PR #37335:
URL: https://github.com/apache/spark/pull/37335#discussion_r933012399


##########
python/pyspark/sql/tests/test_dataframe.py:
##########
@@ -87,6 +87,21 @@ def test_help_command(self):
         pydoc.render_doc(df.foo)
         pydoc.render_doc(df.take(1))
 
+    def test_drop(self):
+        df = self.spark.createDataFrame([("A", 50, "Y"), ("B", 60, "Y")], 
["name", "age", "active"])
+
+        self.assertEqual(df.drop("active").columns, ["name", "age"])
+
+        self.assertEqual(df.drop("active", "nonexistent_column").columns, 
["name", "age"])
+
+        self.assertEqual(df.drop("name", "age", "active").columns, [])

Review Comment:
   No, it shouldn't. The patch is related to `df.drop(Column*)` and not 
`df.drop(str*)`. The added assert is for testing regression which this method 
lacked before this patch.



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