pub unsafe fn schema_from_arrow(
connection: duckdb_connection,
schema: &mut ArrowSchema,
) -> Result<ArrowConvertedSchema, ErrorData>Expand description
Translates an Arrow schema into DuckDB type descriptors
(duckdb_schema_from_arrow).
schema is read, not consumed: the caller still owns it and it is released
when its ArrowSchema drops. It is taken by &mut because the C signature
is struct ArrowSchema *, even though PopulateArrowTableSchema receives it
as const ArrowSchema &.
schema must be the struct schema at the root of a record batch: DuckDB
makes one column per child.
§Errors
DuckDbErrorType::InvalidInputifschemahas already been released, whichDuckDBwould dereference rather than diagnose.- Whatever
DuckDBreports for an Arrow type it cannot map — a released child schema, or an unsupported format string.
§Safety
connection must be a live duckdb_connection.