prestige-macros
Proc macros for deriving Prestige parquet trait implementations. This crate is used internally by the prestige crate and re-exported through it — you typically don't need to depend on this crate directly.
Available Macros
#[prestige::prestige_schema]
The primary attribute macro. Generates all Arrow schema, reader, and writer implementations in one shot. Automatically injects Serialize and Deserialize derives if not already present.
Individual Derive Macros
For advanced use cases where you need only a subset of functionality:
#[derive(ArrowGroup)]— Schema generation (arrow_schema())#[derive(ArrowReader)]— Deserialization from Arrow/Parquet (from_arrow_records(),from_arrow_reader())#[derive(ArrowWriter)]— Serialization to Arrow/Parquet (to_arrow_arrays(),write_arrow_file(),write_arrow_stream())
Field-Level Attributes
#[prestige(as_binary)]
Encode byte fields as native Arrow binary types instead of the default list representation:
[u8; N]→FixedSizeBinary(N)(default without attribute:FixedSizeList(N, UInt8))Vec<u8>→Binary(default without attribute:List(UInt8))
#[prestige(identifier)]
Mark fields as identifier columns (used for deduplication in Iceberg tables). Identifier fields must not be Option<T>.
#[prestige(partition)] / #[prestige(partition(transform))]
Define Iceberg partition fields. Available transforms:
identity(default when no transform specified)year,month,day,hourbucket(n),truncate(n)
#[prestige(sort_key)] / #[prestige(sort_key(options))]
Define Iceberg sort order. Options:
sort_key— ascending (default)sort_key(desc)— descendingsort_key(order = N)— explicit orderingsort_key(desc, order = N)— descending with explicit order
Struct-Level Attributes
#[prestige(table = "name", namespace = "ns")]
Set default Iceberg table name and namespace (dot-separated for nested namespaces):
License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.