Module mz_persist_types::arrow
source Β· Expand description
A protobuf representation of Apache Arrow arrays.
Β§Motivation
Persist can store a small amount of data inline at the consensus layer. Because we are space constrained, we take particular care to store only the data that is necessary. Other Arrow serialization formats, e.g. Parquet or Arrow IPC, include data that we donβt need and would be wasteful to store.
Modules§
- proto π
Structs§
- An array with precisely one entry, for use as a lower bound.
- A struct representing a particular entry in a particular array. Most useful for its
Ord
implementation, which can compare entire rows across similarly-typed arrays.
Enums§
- Wraps a single arrow array, downcasted to a specific type.
Functions§
- Extract the list of fields for our recursive datatypes.
- from_
proto_ πwith_ type Decode the array data. If the data type is omitted from the proto, we decode it as the expected type. - into_
proto_ πwith_ type Encode the array into proto. If an expected data type is passed, that implies it is encoded at some higher level, and we omit it from the data. - list_
range π - maybe_
trim_ πproto Makes a best effort to shrink the proto while preserving the ordering. (The proto might not be smaller after this method is called, but it should always be a valid lower bound.)