Module arrow_schema::ffi

source ·
Expand description

Contains declarations to bind to the C Data Interface.


// Create from data type
let ffi_data_type = FFI_ArrowSchema::try_from(&DataType::LargeUtf8).unwrap();
let back = DataType::try_from(&ffi_data_type).unwrap();
assert_eq!(back, DataType::LargeUtf8);

// Create from schema
let schema = Schema::new(vec![Field::new("foo", DataType::Int64, false)]);
let ffi_schema = FFI_ArrowSchema::try_from(&schema).unwrap();
let back = Schema::try_from(&ffi_schema).unwrap();

assert_eq!(schema, back);

Structs