[−][src]Trait datafusion::table::Table
Table is an abstraction of a logical query plan
Required methods
fn select_columns(&self, columns: Vec<&str>) -> Result<Arc<dyn Table>>
Select columns by name
fn select(&self, expr: Vec<Expr>) -> Result<Arc<dyn Table>>
Create a projection based on arbitrary expressions
fn filter(&self, expr: Expr) -> Result<Arc<dyn Table>>
Create a selection based on a filter expression
fn aggregate(
&self,
group_expr: Vec<Expr>,
aggr_expr: Vec<Expr>
) -> Result<Arc<dyn Table>>
&self,
group_expr: Vec<Expr>,
aggr_expr: Vec<Expr>
) -> Result<Arc<dyn Table>>
Perform an aggregate query
fn limit(&self, n: usize) -> Result<Arc<dyn Table>>
limit the number of rows
fn to_logical_plan(&self) -> LogicalPlan
Return the logical plan
fn col(&self, name: &str) -> Result<Expr>
Return an expression representing a column within this table
fn min(&self, expr: &Expr) -> Result<Expr>
Create an expression to represent the min() aggregate function
fn max(&self, expr: &Expr) -> Result<Expr>
Create an expression to represent the max() aggregate function
fn sum(&self, expr: &Expr) -> Result<Expr>
Create an expression to represent the sum() aggregate function
fn avg(&self, expr: &Expr) -> Result<Expr>
Create an expression to represent the avg() aggregate function
fn count(&self, expr: &Expr) -> Result<Expr>
Create an expression to represent the count() aggregate function
fn collect(
&self,
ctx: &mut ExecutionContext,
batch_size: usize
) -> Result<Vec<RecordBatch>>
&self,
ctx: &mut ExecutionContext,
batch_size: usize
) -> Result<Vec<RecordBatch>>
Collects the result as a vector of RecordBatch.
fn schema(&self) -> &Schema
Returns the schema
Implementors
impl Table for TableImpl
[src]
fn select_columns(&self, columns: Vec<&str>) -> Result<Arc<dyn Table>>
[src]
Apply a projection based on a list of column names
fn select(&self, expr_list: Vec<Expr>) -> Result<Arc<dyn Table>>
[src]
Create a projection based on arbitrary expressions
fn filter(&self, expr: Expr) -> Result<Arc<dyn Table>>
[src]
Create a selection based on a filter expression
fn aggregate(
&self,
group_expr: Vec<Expr>,
aggr_expr: Vec<Expr>
) -> Result<Arc<dyn Table>>
[src]
&self,
group_expr: Vec<Expr>,
aggr_expr: Vec<Expr>
) -> Result<Arc<dyn Table>>
Perform an aggregate query
fn limit(&self, n: usize) -> Result<Arc<dyn Table>>
[src]
Limit the number of rows
fn col(&self, name: &str) -> Result<Expr>
[src]
Return an expression representing a column within this table
fn min(&self, expr: &Expr) -> Result<Expr>
[src]
Create an expression to represent the min() aggregate function
fn max(&self, expr: &Expr) -> Result<Expr>
[src]
Create an expression to represent the max() aggregate function
fn sum(&self, expr: &Expr) -> Result<Expr>
[src]
Create an expression to represent the sum() aggregate function
fn avg(&self, expr: &Expr) -> Result<Expr>
[src]
Create an expression to represent the avg() aggregate function
fn count(&self, expr: &Expr) -> Result<Expr>
[src]
Create an expression to represent the count() aggregate function
fn to_logical_plan(&self) -> LogicalPlan
[src]
Convert to logical plan
fn collect(
&self,
ctx: &mut ExecutionContext,
batch_size: usize
) -> Result<Vec<RecordBatch>>
[src]
&self,
ctx: &mut ExecutionContext,
batch_size: usize
) -> Result<Vec<RecordBatch>>
fn schema(&self) -> &Schema
[src]
Returns the schema from the logical plan