rdblue commented on code in PR #3221:
URL: https://github.com/apache/parquet-java/pull/3221#discussion_r2130577887
##########
parquet-variant/src/main/java/org/apache/parquet/variant/VariantUtil.java:
##########
@@ -848,4 +848,73 @@ static HashMap<String, Integer> getMetadataMap(ByteBuffer
metadata) {
}
return result;
}
+
+ /**
+ * Computes the actual size (in bytes) of the Variant value at
`value[pos...]`
+ * @param value The Variant value
+ * @return The size (in bytes) of the Variant value
+ */
+ public static int valueSize(ByteBuffer value) {
+ int pos = value.position();
+ checkIndex(pos, value.limit());
Review Comment:
This is guaranteed by `Buffer`, the parent of `ByteBuffer`.
--
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]