Module datafusion_expr::utils
source · Expand description
Expression utilities
Constants
- The value to which
COUNT(*)
is expanded to inCOUNT(<constant>)
expressions
Functions
- 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
- 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
- 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
andExpr::AggregateUDF
. 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. - 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. - from_planDeprecatedReturns 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.