Expand description
Encoder to create FlightData streams from RecordBatch streams.
See FlightDataEncoderBuilder.
Re-exportsยง
use std::collections::VecDeque;๐use std::fmt::Debug;๐use std::fmt::Debug;๐use std::pin::Pin;๐use std::sync::Arc;๐use std::task::Poll;๐use crate::FlightData;๐use crate::FlightDescriptor;๐use crate::SchemaAsIpc;๐use crate::error::Result;๐use arrow_array::Array;๐use arrow_array::ArrayRef;๐use arrow_array::RecordBatch;๐use arrow_array::RecordBatchOptions;๐use arrow_array::UnionArray;๐use arrow_ipc::writer::DictionaryTracker;๐use arrow_ipc::writer::IpcDataGenerator;๐use arrow_ipc::writer::IpcWriteContext;๐use arrow_ipc::writer::IpcWriteOptions;๐use arrow_schema::ArrowError;๐use arrow_schema::DataType;๐use arrow_schema::Field;๐use arrow_schema::FieldRef;๐use arrow_schema::Fields;๐use arrow_schema::Schema;๐use arrow_schema::SchemaRef;๐use arrow_schema::UnionMode;๐use bytes::Bytes;๐use futures::Stream;๐use futures::StreamExt;๐use futures::ready;๐use futures::stream::BoxStream;๐
Structsยง
- Flight
Data Encoder - Stream that encodes a stream of record batches to flight data.
- Flight
Data Encoder Builder - Creates a [
Stream] ofFlightDatas from aStreamofResult<RecordBatch,FlightError>. - Flight
IpcEncoder ๐ - The data needed to encode a stream of flight data, holding on to shared Dictionaries.
Enumsยง
- Dictionary
Handling - Defines how a
FlightDataEncoderencodesDictionaryArrays
Constantsยง
- GRPC_
TARGET_ MAX_ FLIGHT_ SIZE_ BYTES - Default target size for encoded
FlightData.
Functionsยง
- hydrate_
dictionaries ๐ - Hydrates any dictionaries arrays in
batchto its underlying type. See hydrate_dictionary for more information. - hydrate_
dictionary ๐ - Hydrates a dictionary to its underlying type.
- prepare_
field_ ๐for_ flight - prepare_
schema_ ๐for_ flight - Prepare an arrow Schema for transport over the Arrow Flight protocol
- split_
batch_ ๐for_ grpc_ response - Split
RecordBatchso it hopefully fits into a gRPC response.