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


##########
core/src/main/java/org/apache/iceberg/util/JsonUtil.java:
##########
@@ -374,4 +380,40 @@ void validate(JsonNode element) {
           element);
     }
   }
+
+  public static void writeIntegerArray(
+      String property, Collection<Integer> items, JsonGenerator gen) throws 
IOException {

Review Comment:
   We usually accept `Iterable` rather than `Collection` in cases where we just 
need to iterate so that we don't need to allocate a new list/set and collect 
into it. That would simplify some calls:
   
   ```
         JsonUtil.writeStringArray(
             MANIFESTS,
             Iterables.transform(snapshot.allManifests(DUMMY_FILE_IO), 
ManifestFile::path),
             generator);
   ```



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