Expand description
Standard Arrow IPC streams over COPY, using Flight’s bulk ingestion core.
Only the IPC encapsulation changes: schema and record-batch metadata/bodies are forwarded intact to the Flight decoder, preserving its single-region fast path, compression, schema evolution and write semantics. COPY returns one final row count, not Flight’s per-batch request IDs or timings.
Structs§
- Arrow
Copy 🔒State - One IPC stream and one lazy Flight ingestion stream. No background task is needed: each completed batch drives the handler to its acknowledgement before accepting the next batch. Dropping COPY drops the decoder and pending writes.
- Arrow
Options 🔒 - Flight’s ingestion hints, scoped to one COPY rather than the connection.
Functions§
- build_
arrow_ 🔒codec - decompressed_
size 🔒 - Compressed IPC buffers carry their uncompressed length in an i64 prefix. Includes the peak LZ4 workspace, which depends on its frame header, not the IPC length prefix. Buffers are decoded sequentially, so workspaces do not sum.
- frame_
prefix 🔒 - Reads both modern continuation-prefixed and legacy IPC message lengths.
- frame_
target 🔒 - The next framing boundary, so a large CopyData never queues many batches.
- lz4_
workspace_ 🔒size - lz4_flex 0.14 allocates a source block plus a destination block; linked mode uses two destination blocks and a 64 KiB history window. Admission must cover these allocations even when the IPC prefix claims just one byte of output. See the LZ4 frame specification’s magic, FLG and BD fields and lz4_flex::frame::FrameDecoder::read_frame_info. Keep this calculation in sync with the pinned decoder version used by Arrow.
- validate_
lz4_ 🔒output - Rejects dishonest LZ4 output lengths before Arrow’s unbounded read_to_end. The same decoder Arrow uses is drained block-by-block without collecting output. Each block fits the workspace already admitted above; as soon as a block exceeds the remaining declared length, decoding stops. Thus even a tiny declared length cannot trigger an unreserved whole-output allocation. FIXME(#10470): Remove this extra LZ4 pass when Arrow bounds output itself.
- visit_
compressed_ 🔒buffers - Visits compressed record/dictionary buffers, excluding their IPC length prefix. A length of -1 denotes an uncompressed buffer; zero is empty.