fn split_join_requirements(
left_len: usize,
indices: RequiredIndices,
join_type: &JoinType,
) -> (RequiredIndices, RequiredIndices)Expand description
Splits requirement indices for a join into left and right children based on the join type.
This function takes the length of the left child, a slice of requirement
indices, and the type of join (e.g. INNER, LEFT, RIGHT) as arguments.
Depending on the join type, it divides the requirement indices into those
that apply to the left child and those that apply to the right child.
-
For
INNER,LEFT,RIGHT,FULL,LEFTMARK, andRIGHTMARKjoins, the requirements are split between left and right children. The right child indices are adjusted to point to valid positions within the right child by subtracting the length of the left child. -
For
LEFT ANTI,LEFT SEMI,RIGHT SEMIandRIGHT ANTIjoins, all requirements are re-routed to either the left child or the right child directly, depending on the join type.
§Parameters
left_len- The length of the left child.indices- A slice of requirement indices.join_type- The type of join (e.g.INNER,LEFT,RIGHT).
§Returns
A tuple containing two vectors of usize indices: The first vector represents
the requirements for the left child, and the second vector represents the
requirements for the right child. The indices are appropriately split and
adjusted based on the join type.