rdblue commented on code in PR #3202:
URL: https://github.com/apache/parquet-java/pull/3202#discussion_r2069424739
##########
parquet-variant/src/main/java/org/apache/parquet/variant/VariantUtil.java:
##########
@@ -329,6 +366,75 @@ static Variant.Type getType(ByteBuffer value) {
}
}
+ /**
+ * Computes the actual size (in bytes) of the Variant value at
`value[pos...]`
+ * @param value The Variant value
+ * @param pos The starting index of the Variant value
+ * @return The size (in bytes) of the Variant value
+ */
+ public static int valueSize(ByteBuffer value, int pos) {
Review Comment:
I think this can be avoided by a different serialization strategy for arrays
and objects because you could use the actual bytes written for the length of
elements or field values.
--
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]