prepare_sorted_exprs

Function prepare_sorted_exprs 

Source
pub fn prepare_sorted_exprs(
    filter: &JoinFilter,
    left: &Arc<dyn ExecutionPlan>,
    right: &Arc<dyn ExecutionPlan>,
    left_sort_exprs: &LexOrdering,
    right_sort_exprs: &LexOrdering,
) -> Result<(SortedFilterExpr, SortedFilterExpr, ExprIntervalGraph)>
Expand description

Prepares and sorts expressions based on a given filter, left and right schemas, and sort expressions.

This function prepares sorted filter expressions for both the left and right sides of a join operation. It first builds the filter order for each side based on the provided ExecutionPlan. If both sides have valid sorted filter expressions, the function then constructs an expression interval graph and updates the sorted expressions with node indices. The final sorted filter expressions for both sides are then returned.

§Parameters

  • filter - The join filter to base the sorting on.
  • left - The ExecutionPlan for the left side of the join.
  • right - The ExecutionPlan for the right side of the join.
  • left_sort_exprs - The expressions to sort on the left side.
  • right_sort_exprs - The expressions to sort on the right side.

§Returns

  • A tuple consisting of the sorted filter expression for the left and right sides, and an expression interval graph.