zhengruifeng commented on code in PR #38686:
URL: https://github.com/apache/spark/pull/38686#discussion_r1028811655
##########
connector/connect/src/test/scala/org/apache/spark/sql/connect/planner/SparkConnectProtoSuite.scala:
##########
@@ -148,6 +148,23 @@ class SparkConnectProtoSuite extends PlanTest with
SparkConnectPlanTest {
comparePlans(connectPlan2, sparkPlan2)
}
+ test("SPARK-41169: Test drop") {
+ // single column
+ val connectPlan = connectTestRelation.drop("id")
+ val sparkPlan = sparkTestRelation.drop("id")
+ comparePlans(connectPlan, sparkPlan)
+
+ // all columns
+ val connectPlan2 = connectTestRelation.drop("id", "name")
+ val sparkPlan2 = sparkTestRelation.drop("id", "name")
+ comparePlans(connectPlan2, sparkPlan2)
+
+ // non-existing column
Review Comment:
I just checked the implementation of `Dataset.drop`, it supports all kinds
of expressions, a expression will be just ignored if it doesn't semanticEquals
the columns in current dataframe.
--
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]