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

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

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


##########
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:
   Why not make it oneof then?



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