[][src]Struct datafusion::execution::context::ExecutionContext

pub struct ExecutionContext { /* fields omitted */ }

Execution context for registering data sources and executing queries

Methods

impl ExecutionContext[src]

pub fn new() -> Self[src]

Create a new excution context for in-memory queries

pub fn sql(
    &mut self,
    sql: &str,
    batch_size: usize
) -> Result<Rc<RefCell<dyn Relation>>>
[src]

Execute a SQL query and produce a Relation (a schema-aware iterator over a series of RecordBatch instances)

pub fn create_logical_plan(&mut self, sql: &str) -> Result<Arc<LogicalPlan>>[src]

Creates a logical plan

pub fn register_csv(
    &mut self,
    name: &str,
    filename: &str,
    schema: &Schema,
    has_header: bool
)
[src]

Register a CSV file as a table so that it can be queried from SQL

pub fn register_table(&mut self, name: &str, provider: Rc<dyn TableProvider>)[src]

Register a table so that it can be queried from SQL

pub fn table(&mut self, table_name: &str) -> Result<Arc<dyn Table>>[src]

Get a table by name

pub fn execute(
    &mut self,
    plan: &LogicalPlan,
    batch_size: usize
) -> Result<Rc<RefCell<dyn Relation>>>
[src]

Execute a logical plan and produce a Relation (a schema-aware iterator over a series of RecordBatch instances)

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> FromCast for T

impl<T, U> Cast for T where
    U: FromCast<T>, 

impl<T, U> TryInto for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err