Expand description
Apache Arrow bridge for crate::SpectrumRecord.
This module is gated behind the arrow Cargo feature. It exposes:
spectrum_record_schema: the canonical ArrowSchemafor a stream ofSpectrumRecords.SpectrumBatchBuilder: a streaming builder that accumulates rows and produces aRecordBatchwhen finalized.
The schema is intentionally flat (one row per spectrum). Peak arrays
are stored as LargeList<Float64> / LargeList<Float32> so that
individual spectra can exceed i32::MAX peaks without truncation.
Precursor fields are inlined as nullable scalar columns; an MS1
spectrum has all precursor columns null. This shape is friendly to
Polars / DataFusion / DuckDB consumers.
The Arrow schema is part of this crate’s stable surface for the
purposes of consumers that pin openproteo-core directly; any column
addition is a minor-version bump, any removal or rename is breaking.
Structs§
- Spectrum
Batch Builder - Streaming builder that accumulates
SpectrumRecords and produces a single ArrowRecordBatchwhen finalized.
Functions§
- spectrum_
record_ schema - Return the canonical
Schemafor aRecordBatchof spectra.