ueshin commented on code in PR #40109:
URL: https://github.com/apache/spark/pull/40109#discussion_r1114779096
##########
connector/connect/common/src/main/protobuf/spark/connect/commands.proto:
##########
@@ -128,7 +128,7 @@ message WriteOperationV2 {
// (Optional) A provider for the underlying output data source. Spark's
default catalog supports
// "parquet", "json", etc.
- string provider = 3;
+ optional string provider = 3;
Review Comment:
We can omit `optional` only when we can see the default value is the same as
unset, e.g., empty list/map and unset. Even for empty list/map, if we can't see
they are the same, we should use `optional`. See #39960 for example.
In this case, the default value for string `""` is different from unset.
##########
connector/connect/common/src/main/protobuf/spark/connect/commands.proto:
##########
@@ -128,7 +128,7 @@ message WriteOperationV2 {
// (Optional) A provider for the underlying output data source. Spark's
default catalog supports
// "parquet", "json", etc.
- string provider = 3;
+ optional string provider = 3;
Review Comment:
We can omit `optional` only when we can see the default value is the same as
unset, e.g., empty list/map and unset. Even for empty list/map, if we can't see
they are the same, we should use `optional`. See #39960 for example.
In this case, the default value for string, `""`, is different from unset.
--
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]