Module datafusion_expr::utils

source ·
Expand description

Expression utilities

Constants§

Functions§

  • returns a new LogicalPlan that wraps plan in a LogicalPlan::Filter with its predicate be all predicates 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 contain Expr::GroupingSet or only has one expression,
    no conversion will be performed.
  • Resolves an Expr::Wildcard to a collection of qualified Expr::Column’s.
  • Resolves an Expr::Wildcard to a collection of Expr::Column’s.
  • Convert any Expr to an Expr::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. 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.
  • from_planDeprecated
    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
  • Splits an binary operator tree Expr such as A <OP> B <OP> C => [A, B, C]
  • Splits an owned binary operator tree Expr such as A <OP> B <OP> C => [A, B, C]
  • Splits a conjunctive Expr such as A AND B AND C => [A, B, C]
  • Splits an owned conjunctive Expr such as A AND B AND C => [A, B, C]