This function returns all Arc<dyn PhysicalExpr>
s inside the given
PhysicalSortExpr
sequence.
Compare the two expr lists are equal no matter the order.
For example two InListExpr can be considered to be equals no matter the order:
Strictly compare the two expr lists are equal in the given order.
Calculates the output orderings for a set of expressions within the context of a given
execution plan. The resulting orderings are all in the type of
Column
, since these
expressions become
Column
after the projection step. The expressions having an alias
are renamed with those aliases in the returned
PhysicalSortExpr
’s. If an expression
is found to be unordered, the corresponding entry in the output vector is
None
.
Find the finer requirement among req1
and req2
If None
, this means that req1
and req2
are not compatible
e.g there is no requirement that satisfies both
This function finds the indices of targets
within items
using strict
equality.
This function finds the indices of targets
within items
, taking into
account equivalences according to equal_properties
.
Attempts to find a full match between the required columns to be ordered (lexicographically), and
the provided sort options (lexicographically), while considering equivalence properties.
This function maps back requirement after ProjectionExec
to the Executor for its input.
Merge left and right sort expressions, checking for duplicates.
Normalize the output expressions based on Columns Map.
Checks whether given ordering requirements are satisfied by provided
PhysicalSortExprs.
Re-assign column indices referenced in predicate according to given schema.
This may be helpful when dealing with projections.
Reverses the ORDER BY expression, which is useful during equivalent window
expression construction. For instance, ‘ORDER BY a ASC, NULLS LAST’ turns into
‘ORDER BY a DESC, NULLS FIRST’.
Scatter truthy
array by boolean mask. When the mask evaluates true
, next values of truthy
are taken, when the mask evaluates false
values null values are filled.
Assume the predicate is in the form of CNF, split the predicate to a Vec of PhysicalExprs.