Fokko commented on code in PR #3352:
URL: https://github.com/apache/parquet-java/pull/3352#discussion_r2464030065


##########
parquet-protobuf/src/main/java/org/apache/parquet/proto/ProtoWriteSupport.java:
##########
@@ -445,10 +445,13 @@ final void writeField(Object value) {
 
     private void writeAllFields(MessageOrBuilder pb) {
       Descriptor messageDescriptor = pb.getDescriptorForType();
-      Descriptors.FileDescriptor.Syntax syntax =
-          messageDescriptor.getFile().getSyntax();
+      String syntax = messageDescriptor.getFile().toProto().getSyntax();
+      if ("editions".equals(syntax)) {
+        throw new UnsupportedOperationException("protocol buffers 'editions' 
not supported");
+      }
+      boolean isProto2 = !"proto3".equals(syntax);

Review Comment:
   Wouldn't it be better to check the versions explicitly, and raise on 
anything else (for example `editions`, as above).
   ```suggestion
         boolean isProto2 = "proto2".equals(syntax);
   ```



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

Reply via email to