Path: blob/main/crates/polars-arrow/src/io/ipc/read/mod.rs
6940 views
//! APIs to read Arrow's IPC format.1//!2//! The two important structs here are the [`FileReader`](reader::FileReader),3//! which provides arbitrary access to any of its messages, and the4//! [`StreamReader`](stream::StreamReader), which only supports reading5//! data in the order it was written in.6use crate::array::Array;78mod array;9mod common;10mod deserialize;11mod error;12pub(crate) mod file;13#[cfg(feature = "io_flight")]14mod flight;15mod read_basic;16mod reader;17mod schema;18mod stream;1920pub(crate) use common::first_dict_field;21pub use common::{ProjectionInfo, prepare_projection};22pub use error::OutOfSpecKind;23pub use file::{24FileMetadata, deserialize_footer, get_row_count, get_row_count_from_blocks, read_batch,25read_file_dictionaries, read_file_metadata,26};27use polars_utils::aliases::PlHashMap;28pub use reader::FileReader;29pub use schema::deserialize_schema;30pub use stream::{StreamMetadata, StreamReader, StreamState, read_stream_metadata};3132/// how dictionaries are tracked in this crate33pub type Dictionaries = PlHashMap<i64, Box<dyn Array>>;3435pub(crate) type Node<'a> = arrow_format::ipc::FieldNodeRef<'a>;36pub(crate) type IpcBuffer<'a> = arrow_format::ipc::BufferRef<'a>;37pub(crate) type Compression<'a> = arrow_format::ipc::BodyCompressionRef<'a>;38pub(crate) type Version = arrow_format::ipc::MetadataVersion;3940#[cfg(feature = "io_flight")]41pub use flight::*;4243pub trait SendableIterator: Send + Iterator {}4445impl<T: Iterator + Send> SendableIterator for T {}464748