pub enum LogicalPlan {
Limit {
limit: usize,
input: Rc<LogicalPlan>,
schema: Rc<Schema>,
},
Projection {
expr: Vec<Expr>,
input: Rc<LogicalPlan>,
schema: Rc<Schema>,
},
Selection {
expr: Expr,
input: Rc<LogicalPlan>,
},
Aggregate {
input: Rc<LogicalPlan>,
group_expr: Vec<Expr>,
aggr_expr: Vec<Expr>,
schema: Rc<Schema>,
},
Sort {
expr: Vec<Expr>,
input: Rc<LogicalPlan>,
schema: Rc<Schema>,
},
TableScan {
schema_name: String,
table_name: String,
schema: Rc<Schema>,
projection: Option<Vec<usize>>,
},
CsvFile {
filename: String,
schema: Rc<Schema>,
has_header: bool,
projection: Option<Vec<usize>>,
},
NdJsonFile {
filename: String,
schema: Rc<Schema>,
projection: Option<Vec<usize>>,
},
ParquetFile {
filename: String,
schema: Rc<Schema>,
projection: Option<Vec<usize>>,
},
EmptyRelation {
schema: Rc<Schema>,
},
}
The LogicalPlan represents different types of relations (such as Projection, Selection, etc) and
can be created by the SQL query planner and the DataFrame API.
A relation that applies a row limit to its child relation
Fields of Limit
A Projection (essentially a SELECT with an expression list)
Fields of Projection
A Selection (essentially a WHERE clause with a predicate expression)
Fields of Selection
Represents a list of aggregate expressions with optional grouping expressions
Fields of Aggregate
Represents a list of sort expressions to be applied to a relation
Fields of Sort
A table scan against a table that has been registered on a context
Fields of TableScan
Represents a CSV file with a provided schema
Fields of CsvFile
Represents an ndjson file with a provided schema
Fields of NdJsonFile
Represents a Parquet file that contains schema information
Fields of ParquetFile
An empty relation with an empty schema
Fields of EmptyRelation
Get a reference to the logical plan's schema
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more