Expand description
This module provides a builder for creating LogicalPlans
Structs§
- Logical
Plan Builder - Builder for logical plans
- Logical
Plan Builder Options - Options for
LogicalPlanBuilder
- Logical
Table Source - Basic TableSource implementation intended for use in tests and documentation. It is expected that users will provide their own TableSource implementations or use DataFusion’s DefaultTableSource.
Constants§
- UNNAMED_
TABLE - Default table name for unnamed table
Functions§
- add_
group_ by_ exprs_ from_ dependencies - Add additional “synthetic” group by expressions based on functional dependencies.
- build_
join_ schema - Creates a schema for a join operation. The fields from the left side are first
- change_
redundant_ column - get_
struct_ unnested_ columns - project
- Create Projection
- requalify_
sides_ if_ needed - (Re)qualify the sides of a join if needed, i.e. if the columns from one side would otherwise conflict with the columns from the other. This is especially useful for queries that come as Substrait, since Substrait doesn’t currently allow specifying aliases, neither for columns nor for tables. DataFusion requires columns to be uniquely identifiable, in some places (see e.g. DFSchema::check_names). The function returns:
- subquery_
alias - Create a SubqueryAlias to wrap a LogicalPlan.
- table_
scan - Create a LogicalPlanBuilder representing a scan of a table with the provided name and schema. This is mostly used for testing and documentation.
- table_
scan_ with_ filter_ and_ fetch - Create a LogicalPlanBuilder representing a scan of a table with the provided name and schema, filters, and inlined fetch. This is mostly used for testing and documentation.
- table_
scan_ with_ filters - Create a LogicalPlanBuilder representing a scan of a table with the provided name and schema, and inlined filters. This is mostly used for testing and documentation.
- table_
source - table_
source_ with_ constraints - union
- Union two
LogicalPlan
s. - union_
by_ name - Like
union
, but combine rows from different tables by name, rather than by position. - unnest
- Create a
LogicalPlan::Unnest
plan - unnest_
with_ options - Create a
LogicalPlan::Unnest
plan with options This function receive a list of columns to be unnested because multiple unnest can be performed on the same column (e.g unnest with different depth) The new schema will contains post-unnest fields replacing the original field - validate_
unique_ names - Errors if one or more expressions have equal names.
- wrap_
projection_ for_ join_ if_ necessary - Wrap projection for a plan, if the join keys contains normal expression.