You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: validate type strings in ColumnDef constructor to reject invalid types early (#78)
Change ColumnDef::new() to return Result<Self> and validate the
ducklake_type string by calling ducklake_to_arrow_type() before
constructing. This catches invalid type strings at write time rather
than deferring the error to read time, where it would surface as a
confusing failure.
Make ColumnDef fields pub(crate) instead of pub to prevent bypassing
validation via struct literal construction. Add public getter methods
(name(), ducklake_type(), is_nullable()) for external consumers.
Simplify arrow_schema_to_column_defs() in table_writer.rs to use
ColumnDef::from_arrow() directly, removing the redundant
arrow_to_ducklake_type + ColumnDef::new round-trip.
Update all call sites to handle the Result, and add tests verifying
that valid types are accepted while invalid and empty types are
rejected.
0 commit comments