pub fn encode_instrument_closes(
data: &[InstrumentClose],
) -> Result<RecordBatch, ArrowError>Expand description
Encodes instrument closes as a display-friendly Arrow [RecordBatch].
Emits a Float64 close_price column, Utf8 columns for the instrument
ID and close type, and Timestamp(Nanosecond) columns for event and init
times. Mixed-instrument batches are supported. Precision is lost on the
conversion to f64; use
crate::arrow::instrument_closes_to_arrow_record_batch_bytes for catalog
storage.
Returns an empty [RecordBatch] with the correct schema when data is empty.
ยงErrors
Returns an [ArrowError] if the Arrow RecordBatch cannot be constructed.