Skip to main content

refresh_partition_columns

Function refresh_partition_columns 

Source
pub async fn refresh_partition_columns(
    plan: LogicalPlan,
    catalog_manager: &CatalogManagerRef,
    query_ctx: &QueryContext,
) -> Result<LogicalPlan>
Expand description

Updates the scans in plan whose table changed its partition columns after the plan was built.

Distributed planning reads the partition columns from the table a scan holds, and the regions from the current route. A plan kept across executions, such as a prepared statement’s, must therefore report the current partition columns, or a query that needs merging on the frontend runs entirely on each region.

Returns plan as it is when no scanned table changed its partition columns.