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: [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]