Skip to main content

Module convert

Module convert 

Source
Expand description

wp_model_core 的记录 ↔ Arrow 列的值侧转换(records_to_batch / batch_to_records)。

⚠️ 当前不在生产路径上(全家族 0 调用),与 wp-connector-utilsarrow/record.rs 职责重复(后者是生产在用的一份)。

按规格表 A-2,本模块与 arrow/record.rs合并成一份,作为契约值侧的唯一实现 —— 合并时错误类型要解耦(本 crate 不能依赖 wp-connector-apiSinkResult / SinkReason,改走 crate::error::WpArrowError 或泛型化)。

⚠️ 在此之前,不要拿本模块的转换结果去对拍线协议(理由见 crate 级文档)。

Functions§

batch_to_records
Convert a columnar Arrow RecordBatch back to row-oriented DataRecords.
records_to_batch
Convert row-oriented DataRecords to a columnar Arrow RecordBatch.