try_convert_aggregate_if_better

Function try_convert_aggregate_if_better 

Source
fn try_convert_aggregate_if_better(
    aggr_exprs: Vec<Arc<AggregateFunctionExpr>>,
    prefix_requirement: &[PhysicalSortRequirement],
    eq_properties: &EquivalenceProperties,
) -> Result<Vec<Arc<AggregateFunctionExpr>>>
Expand description

Tries to convert each aggregate expression to a potentially more efficient version.

§Parameters

  • aggr_exprs - A vector of AggregateFunctionExpr representing the aggregate expressions to be optimized.
  • prefix_requirement - An array slice representing the ordering requirements preceding the aggregate expressions.
  • eq_properties - A reference to the EquivalenceProperties object containing ordering information.

§Returns

Returns Ok(converted_aggr_exprs) if the conversion process completes successfully. Any errors occurring during the conversion process are passed through.