steveloughran commented on code in PR #3562:
URL: https://github.com/apache/parquet-java/pull/3562#discussion_r3333052529


##########
parquet-variant/src/test/java/org/apache/parquet/variant/VariantTestUtil.java:
##########
@@ -35,11 +37,12 @@ public class VariantTestUtil {
   /** Random number generator for generating random strings */
   private static SecureRandom random = new SecureRandom(new byte[] {1, 2, 3, 
4, 5});
 
-  static final ByteBuffer EMPTY_METADATA = ByteBuffer.wrap(new byte[] {0b1});
+  // version=1, offsetSize=1, dictSize=0, single end-offset=0 — minimum 
well-formed empty metadata
+  static final ByteBuffer EMPTY_METADATA = ByteBuffer.wrap(new byte[] {0b1, 
0x00, 0x00});

Review Comment:
   good point. my reading of the spec says header includes 'offset size -1`
   set offset-size -1 to 0 and you have
   
   * dictionary size = 1
   * metadata size = 1
   
   This is something maybe to call out/clarify in the docs, but I don't see it 
being possible to declare a zero byte dictionary



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