rdblue commented on code in PR #12138:
URL: https://github.com/apache/iceberg/pull/12138#discussion_r1937812760


##########
core/src/main/java/org/apache/iceberg/variants/VariantMetadata.java:
##########
@@ -34,4 +34,20 @@ public interface VariantMetadata extends Variants.Serialized 
{
 
   /** Returns the size of the metadata dictionary. */
   int dictionarySize();
+
+  static String asString(VariantMetadata metadata) {
+    StringBuilder builder = new StringBuilder();
+
+    builder.append("VariantMetadata(dict={");
+    for (int i = 0; i < metadata.dictionarySize(); i += 1) {
+      if (i > 0) {
+        builder.append(", ");
+      }
+
+      builder.append(i).append(" => ").append(metadata.get(i));

Review Comment:
   It's not an object, so this isn't really a key. It's a mapping from ID. The 
object strings mimic JSON (though that is not a guarantee) but this can't 
because the mapping "keys" are integers.



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to