You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "zhengruifeng (via GitHub)" <gi...@apache.org> on 2023/02/24 08:46:07 UTC

[GitHub] [spark] zhengruifeng commented on a diff in pull request #40013: [SPARK-42367][CONNECT][PYTHON] `DataFrame.drop` should handle duplicated columns properly

zhengruifeng commented on code in PR #40013:
URL: https://github.com/apache/spark/pull/40013#discussion_r1116670536


##########
connector/connect/common/src/main/protobuf/spark/connect/relations.proto:
##########
@@ -318,10 +318,17 @@ message Drop {
   // (Required) The input relation.
   Relation input = 1;
 
-  // (Required) columns to drop.
+  // (Optional) columns to drop.
   //
-  // Should contain at least 1 item.
-  repeated Expression cols = 2;
+  // 'columns' and 'column_names' are mutually exclusive.
+  // If set, should contain at least 1 item.
+  repeated Expression columns = 2;
+
+  // (Optional) column names to drop.
+  //
+  // 'columns' and 'column_names' are mutually exclusive.

Review Comment:
   now we need both for python client, since the inputs can contain columns and names together



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org