[ 
https://issues.apache.org/jira/browse/SPARK-40658?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17614565#comment-17614565
 ] 

Sandish Kumar HN commented on SPARK-40658:
------------------------------------------

[~mposdev21] these are the changes I see between proto2 vs proto3
 # The latest Proto3 also supports optional fields, the difference is optional 
fields which have has_foo() methods, and "singular" fields, which do not. I 
don't see any different treatment needed to handle this. 
 # In contrast to proto3, Proto2 allows custom default values and required 
fields.
 # Enums: Proto3's default value is the enum 0 index value. Proto2 uses the 
first syntactic entry in the enum declaration as the default value if it is not 
specified otherwise.
 # Proto2 does not validate that inbound and outbound bytes are encoded in 
UTF-8. During parsing, all string fields in Proto3 are appropriately UTF-8 
encoded.
 # Proto2 and proto3 are wire compatible, they will have the same binary 
representation.

should we have an optional option setting something like 
PROTO_VERSION_SUPPORT=V3 or V2 or ANY? the default can be ANY. 

> Protobuf v2 & v3 support
> ------------------------
>
>                 Key: SPARK-40658
>                 URL: https://issues.apache.org/jira/browse/SPARK-40658
>             Project: Spark
>          Issue Type: Improvement
>          Components: Structured Streaming
>    Affects Versions: 3.3.0
>            Reporter: Raghu Angadi
>            Priority: Major
>
> We want to ensure Protobuf functions support both Protobuf version 2 and 
> version 3 schemas (e.g. descriptor file or compiled classes with v2 and v3).
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to