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


##########
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:
   update: no, it's impossible to generate a valid zero byte variant
   * fail fast with an explicit message (allows a branch to be cut later)
   * test



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