[][src]Trait datafusion::table::Table

pub trait Table {
    fn select_columns(&self, columns: Vec<&str>) -> Result<Arc<dyn Table>>;
fn select(&self, expr: Vec<Expr>) -> Result<Arc<dyn Table>>;
fn filter(&self, expr: Expr) -> Result<Arc<dyn Table>>;
fn aggregate(
        &self,
        group_expr: Vec<Expr>,
        aggr_expr: Vec<Expr>
    ) -> Result<Arc<dyn Table>>;
fn limit(&self, n: usize) -> Result<Arc<dyn Table>>;
fn to_logical_plan(&self) -> Arc<LogicalPlan>;
fn col(&self, name: &str) -> Result<Expr>;
fn min(&self, expr: &Expr) -> Result<Expr>;
fn max(&self, expr: &Expr) -> Result<Expr>;
fn sum(&self, expr: &Expr) -> Result<Expr>;
fn avg(&self, expr: &Expr) -> Result<Expr>;
fn count(&self, expr: &Expr) -> Result<Expr>;
fn column_index(&self, name: &str) -> Result<usize>; }

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>>

Perform an aggregate query

fn limit(&self, n: usize) -> Result<Arc<dyn Table>>

limit the number of rows

fn to_logical_plan(&self) -> Arc<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 column_index(&self, name: &str) -> Result<usize>

Return the index of a column within this table's schema

Loading content...

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]

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 column_index(&self, name: &str) -> Result<usize>[src]

Return the index of a column within this table's schema

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) -> Arc<LogicalPlan>[src]

Convert to logical plan

Loading content...