Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,6 @@ private void writeBatch() throws IOException {
vectorSchemaRoot.setRowCount(batchRows.size());

// Export via Arrow C Data Interface and write to Vortex
for (FieldVector vector : vectorSchemaRoot.getFieldVectors()) {
bytesWritten += vector.getBufferSize();
}
try (ArrowArray arrowArray = ArrowArray.allocateNew(allocator);
ArrowSchema arrowSchema = ArrowSchema.allocateNew(allocator)) {
Data.exportVectorSchemaRoot(allocator, vectorSchemaRoot, null, arrowArray, arrowSchema);
Expand Down Expand Up @@ -327,10 +324,10 @@ public WriterCommitMessage commit() throws IOException {
writeBatch();
}

// Close the Vortex writer to finalize the file
// Finalize the file; the summary carries its physical size
if (vortexWriter != null) {
try {
vortexWriter.close();
bytesWritten = vortexWriter.finish().fileSize();
} finally {
vortexWriter = null; // Always null out the reference
}
Expand Down
Loading