Module datafusion::logical_expr::utils
source · Expand description
Expression utilities
Enums§
- Represents the sensitivity of an aggregate expression to ordering.
Constants§
- The value to which
COUNT(*)
is expanded to inCOUNT(<constant>)
expressions
Functions§
- Returns a new LogicalPlan that filters the output of
plan
with a LogicalPlan::Filter with allpredicates
ANDed. - can this data type be used in hash join equal conditions?? data types here come from function ‘equal_rows’, if more data types are supported in equal_rows(hash join), add those data types here to generate join logical plan.
- Check whether all columns are from the schema.
- Convert an expression into Column expression if it’s already provided as input plan.
- Compare the sort expr as PostgreSQL’s common_prefix_cmp(): https://github.com/postgres/postgres/blob/master/src/backend/optimizer/plan/planner.c
- Combines an array of filter expressions into a single filter expression consisting of the input filter expressions joined with logical AND.
- Combines an array of filter expressions into a single filter expression consisting of the input filter expressions joined with logical OR.
- Convert multiple grouping expressions into one
GroupingSet::GroupingSets
,
if the grouping expression does not containExpr::GroupingSet
or only has one expression,
no conversion will be performed. - Resolves an
Expr::Wildcard
to a collection of qualifiedExpr::Column
’s. - Resolves an
Expr::Wildcard
to a collection ofExpr::Column
’s. - Convert any
Expr
to anExpr::Column
. - Recursively walk an expression tree, collecting the unique set of columns referenced in the expression
- exprlist_
to_ columns Deprecated Recursively walk a list of expression trees, collecting the unique set of columns referenced in the expression - Create field meta-data from an expression, for use in a result set schema
- Collect all deeply nested
Expr::AggregateFunction
. They are returned in order of occurrence (depth first), with duplicates omitted. - Collect all deeply nested
Expr::Column
’s. They are returned in order of appearance (depth first), and may contain duplicates. - Looks for correlating expressions: for example, a binary expression with one field from the subquery, and one not in the subquery (closed upon from outer scope)
- Collect all deeply nested
Expr::OuterReferenceColumn
. They are returned in order of occurrence (depth first), with duplicates omitted. - Collect all deeply nested
Expr::Sort
. They are returned in order of occurrence (depth first), with duplicates omitted. - Give two sides of the equijoin predicate, return a valid join key pair. If there is no valid join key pair, return None.
- Collect all deeply nested
Expr::WindowFunction
. They are returned in order of occurrence (depth first), with duplicates omitted. - Build state name. State is the intermediate state of the aggregate function.
- from_
plan Deprecated Returns a new logical plan based on the original one with inputs and expressions replaced. - Creates a detailed error message for a function with wrong signature.
- Generate a sort key for a given window expr’s partition_by and order_bu expr
- group a slice of window expression expr by their order by expressions
- Count the number of distinct exprs in a list of group by expressions. If the first element is a
GroupingSet
expression then it must be the only expr. - Find all distinct exprs in a list of group by expressions. If the first element is a
GroupingSet
expression then it must be the only expr. - Recursively inspect an
Expr
and all its children. - merge inputs schema into a single schema.
- Returns the first (and only) element in a slice, or an error