grundprinzip commented on code in PR #38793:
URL: https://github.com/apache/spark/pull/38793#discussion_r1033010370
##########
connector/connect/src/main/protobuf/spark/connect/relations.proto:
##########
@@ -457,3 +458,18 @@ message RenameColumnsByNameToNameMap {
// duplicated B are not allowed.
map<string, string> rename_columns_map = 2;
}
+
+// Adding columns or replacing the existing columns that has the same names.
+message WithColumns {
+ // (Required) The input relation.
+ Relation input = 1;
+
+ // (Required)
+ //
+ // Given a column name, apply corresponding expression on the column. If
column
+ // name exists in the input relation, then replacing the column. if column
name
Review Comment:
```suggestion
// name exists in the input relation, then replacing the column. If the
column name
```
##########
connector/connect/src/main/protobuf/spark/connect/relations.proto:
##########
@@ -457,3 +458,18 @@ message RenameColumnsByNameToNameMap {
// duplicated B are not allowed.
map<string, string> rename_columns_map = 2;
}
+
+// Adding columns or replacing the existing columns that has the same names.
+message WithColumns {
+ // (Required) The input relation.
+ Relation input = 1;
+
+ // (Required)
+ //
+ // Given a column name, apply corresponding expression on the column. If
column
+ // name exists in the input relation, then replacing the column. if column
name
+ // does not exist in the input relation, then adding the column.
+ //
+ // An exception is thrown when there are duplicated names.
Review Comment:
```suggestion
// An exception is thrown when duplicated names are present in the mapping.
```
##########
connector/connect/src/main/protobuf/spark/connect/relations.proto:
##########
@@ -457,3 +458,18 @@ message RenameColumnsByNameToNameMap {
// duplicated B are not allowed.
map<string, string> rename_columns_map = 2;
}
+
+// Adding columns or replacing the existing columns that has the same names.
+message WithColumns {
+ // (Required) The input relation.
+ Relation input = 1;
+
+ // (Required)
+ //
+ // Given a column name, apply corresponding expression on the column. If
column
Review Comment:
```suggestion
// Given a column name, apply the corresponding expression on the column.
If the column
```
##########
connector/connect/src/main/protobuf/spark/connect/relations.proto:
##########
@@ -457,3 +458,18 @@ message RenameColumnsByNameToNameMap {
// duplicated B are not allowed.
map<string, string> rename_columns_map = 2;
}
+
+// Adding columns or replacing the existing columns that has the same names.
+message WithColumns {
+ // (Required) The input relation.
+ Relation input = 1;
+
+ // (Required)
+ //
+ // Given a column name, apply corresponding expression on the column. If
column
+ // name exists in the input relation, then replacing the column. if column
name
+ // does not exist in the input relation, then adding the column.
Review Comment:
```suggestion
// does not exist in the input relation, then add it as a new column.
```
--
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]