rdblue commented on a change in pull request #2001:
URL: https://github.com/apache/iceberg/pull/2001#discussion_r549793691



##########
File path: parquet/src/main/java/org/apache/iceberg/parquet/ParquetWriter.java
##########
@@ -192,5 +203,6 @@ public void close() throws IOException {
     flushRowGroup(true);
     writeStore.close();
     writer.end(metadata);
+    this.closed = true;

Review comment:
       If this is going to track whether the writer is closed, then it should 
make the close idempotent by checking the flag:
   
   ```java
     if (!closed) {
       this.closed = true;
       flushRowGroup(true);
       writeStore.close();
       writer.end(metadata);
     }
   ```
   
   I would also add a precondition in `startRowGroup` that checks that `closed` 
is false.




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

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