Skip to main content

desc_to_schema_with_overrides

Function desc_to_schema_with_overrides 

Source
pub fn desc_to_schema_with_overrides<F>(
    desc: &RelationDesc,
    overrides: F,
) -> Result<Schema, Error>
Expand description

Converts a RelationDesc to an Arrow Schema, with optional type overrides.

The overrides function receives a SqlScalarType and can return:

  • Some((DataType, String)) to override the default mapping
  • None to use the default mapping from scalar_to_arrow_datatype

This allows destinations like Iceberg to customize type mappings for unsupported types (e.g., UInt64 -> Decimal128) while keeping the standard mapping for everything else.