Skip to main content

parse_schema_override

Function parse_schema_override 

Source
pub fn parse_schema_override(
    schema: &Map<String, Value>,
) -> Result<Vec<ColumnSchema>, McpError>
Expand description

Parse a user-provided schema override ({"column_name": "TYPE", ...}) into a Vec<ColumnSchema>. Validates each type name against map_hyper_type and rejects unknown types early. All override columns are marked nullable.

This variant treats the override as a complete schema: it becomes the full Vec<ColumnSchema> in whatever order the JSON object iterates. Used mostly by tests and code paths without an inferred schema to merge onto; prefer apply_schema_override for ingest paths so columns stay aligned with the source file’s header order.

§Errors