Skip to main content

prepare_distinct_grouping_sets

Function prepare_distinct_grouping_sets 

Source
pub fn prepare_distinct_grouping_sets(
    engine: &dyn FunctionTypeResolver,
    statement: &QueryBlockPlan,
    schema: &RowSchema,
    params: &[SQLParam],
) -> Result<Option<QueryBlockPlan>, SQLError>
Expand description

GROUP BY DISTINCT operates on expanded grouping sets after parse analysis. At this point the input schema is known, so equivalent qualified and unqualified columns can share one identity and exact no-op casts can be removed without conflating expressions that PostgreSQL resolves to different operator inputs.