#[derive(Record)]
{
// Attributes available to this derive:
#[event_time]
#[column]
#[nullable]
}
Expand description
Derive the Record trait for a struct.
Generates Record::schema(), Record::to_record_batch(), and
Record::event_time() implementations automatically.
§Supported Field Types
| Rust Type | Arrow DataType |
|---|---|
bool | Boolean |
i8 | Int8 |
i16 | Int16 |
i32 | Int32 |
i64 | Int64 |
u8 | UInt8 |
u16 | UInt16 |
u32 | UInt32 |
u64 | UInt64 |
f32 | Float32 |
f64 | Float64 |
String | Utf8 |
Vec<u8> | Binary |
Option<T> | nullable variant of T |
§Attributes
#[event_time]— marks a field as the event time column#[column("name")]— overrides the Arrow column name#[nullable]— marks a non-Option field as nullable in the schema