Function plan_copy_item

Source
pub fn plan_copy_item(
    scx: &StatementContext<'_>,
    item_name: ResolvedItemName,
    columns: Vec<Ident>,
) -> Result<(CatalogItemId, RelationDesc, Vec<ColumnIndex>, Option<MapFilterProject>), PlanError>
Expand description

Determines the mapping between some external data and a Materialize relation.

Returns the following:

  • CatalogItemId for the destination table.
  • RelationDesc representing the shape of the input data we are copying from.
  • The ColumnIndexes that the source data maps to. TODO(cf2): We don’t need this mapping since we now return a MapFilterProject.
  • MapFilterProject which will map and project the input data to match the shape of the destination table.