Skip to main content

maybe_rename_columns_exact

Function maybe_rename_columns_exact 

Source
pub fn maybe_rename_columns_exact(
    catalog: &dyn SessionCatalog,
    context: impl Display,
    desc: &mut RelationDesc,
    column_names: &[Ident],
) -> Result<(), PlanError>
Expand description

Like maybe_rename_columns, but requires the length of column_names, when non-empty, to match the arity of desc exactly.

The exactness requirement is lifted while re-planning a persisted catalog item, signaled by the unsafe_enable_incomplete_view_column_lists flag that SystemVars::enable_for_item_parsing force-enables during bootstrap. A view that an earlier version accepted with fewer names than columns must keep re-planning, or rehydration would turn a graceful planning error into a fatal bootstrap panic.