[core][format] Support Arrow bundle writes - #9100
Conversation
|
Thanks for working on this. I wonder whether As I understand it, this flag does not actually guarantee a zero-copy or native write. It only controls whether long rowCount = bundle.rowCount();
if (auxiliaryFileWriters.isEmpty()
&& sequenceNumberTracker.supportsRowCountUpdate()
&& !requiresPerRecordStats()) {
super.writeBundle(bundle);
sequenceNumberTracker.updateByRowCount(rowCount);
return;
}
for (InternalRow row : bundle) {
write(row);
}The existing abstractions already provide the remaining dispatch:
In other words, whether to copy or use a native batch path looks like a format-writer implementation detail. The extra boolean duplicates that dispatch and is slightly misleading: Could we remove |
- Remove the producer-side direct-write flag. - Require row-equivalent writes and safe borrowed-buffer handling. - Add schema and allocator fallback checks. - Fix row-count and shredding consistency. - Add regression tests for Arrow, Lance, Mosaic, and Vortex.
…saic writers Preserve existing Arrow, Lance, and Vortex writer behavior by keeping them on the row path unless a writer explicitly supports row-equivalent bundle writes. Enforce the shredding inference bound and keep Mosaic native writes behind schema and allocator-root compatibility checks with safe row fallback.
|
We should remove |
Both removed. |
Purpose
Support writing eligible Paimon
BundleRecordsas Arrow batches without row-by-row materialization when format-specific batch handling is compatible.Bundles that require per-row processing or are incompatible with the target format writer continue to use the existing row path.
Changes
RowDataFileWriterwhen no auxiliary file writer, row-level sequence tracking, or per-record statistics require row iteration.BundleFormatWriterconsume compatible bundles natively, copy them, or fall back to rows while preserving row-equivalent values, ordering, accounting, and borrowed-buffer lifetime.variant.shredding.maxInferBufferRow.Tests