Fix NPE in HivePageSink.abort
If an exception is thrown when processing new partitions, the writers array
may contain nulls.
@@ -167,9 +167,12 @@ public class HivePageSink
private void doAbort()
{
for (HiveWriter writer : writers) {
+ // writers can contain nulls if an exception is thrown when doAppend expends the writer list
+ if (writer != null) {
writer.rollback();
}
}
+ }
@Override
public CompletableFuture<?> appendPage(Page page)
