singhpk234 commented on code in PR #17931:
URL: https://github.com/apache/iceberg/pull/17931#discussion_r3920142457
##########
core/src/main/java/org/apache/iceberg/view/ViewMetadataParser.java:
##########
@@ -190,11 +190,10 @@ private static void internalWrite(
boolean isGzip = Codec.fromFileName(outputFile.location()) == Codec.GZIP;
OutputStream stream = overwrite ? outputFile.createOrOverwrite() :
outputFile.create();
try (OutputStreamWriter writer =
- new OutputStreamWriter(
- isGzip ? new GZIPOutputStream(stream) : stream,
StandardCharsets.UTF_8)) {
- JsonGenerator generator = JsonUtil.factory().createGenerator(writer);
+ new OutputStreamWriter(
+ isGzip ? new GZIPOutputStream(stream) : stream,
StandardCharsets.UTF_8);
+ JsonGenerator generator = JsonUtil.factory().createGenerator(writer)) {
toJson(metadata, generator);
- generator.flush();
Review Comment:
why not call this ? and not rely on the close() to call the flush ?
--
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]