edgarRd commented on a change in pull request #139: ORC support integration for
Spark 2.4.0
URL: https://github.com/apache/incubator-iceberg/pull/139#discussion_r281427398
##########
File path: orc/src/main/java/org/apache/iceberg/orc/OrcFileAppender.java
##########
@@ -108,12 +115,43 @@ public long length() {
@Override
public void close() throws IOException {
if (!isClosed) {
- this.isClosed = true;
- writer.close();
+ try {
+ if (batch.size > 0) {
+ writer.addRowBatch(batch);
+ batch.reset();
+ }
+ } finally {
+ writer.close();
+ this.isClosed = true;
+ }
}
}
public TypeDescription getSchema() {
Review comment:
I've removed this call since it was not used.
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]