rdblue commented on code in PR #3212:
URL: https://github.com/apache/parquet-java/pull/3212#discussion_r2079998493


##########
parquet-variant/src/main/java/org/apache/parquet/variant/VariantBuilder.java:
##########
@@ -101,6 +132,32 @@ public Variant build() {
     return new Variant(Arrays.copyOfRange(writeBuffer, 0, writePos), metadata);
   }
 
+  // This is used in the shredded reader to check if anything has been written 
to the Variant since the last call.
+  // Tracking in the reader code is a bit awkward, but maybe better than 
polluting this interface.
+  int getWritePos() {
+    return writePos;
+  }
+
+  /**
+   * @return the constructed Variant value binary, without metadata.
+   */
+  public byte[] valueWithoutMetadata() {

Review Comment:
   I wonder if we should make metadata part of this API or if we should pass in 
a metadata instance that does the lookup to resolve a name. Then metadata would 
be a separate builder that implements that API.



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