[−][src]Struct datafusion::execution::context::ExecutionContext
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]
&mut self,
sql: &str,
batch_size: usize
) -> Result<Rc<RefCell<dyn Relation>>>
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]
&mut self,
name: &str,
filename: &str,
schema: &Schema,
has_header: bool
)
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]
&mut self,
plan: &LogicalPlan,
batch_size: usize
) -> Result<Rc<RefCell<dyn Relation>>>
Execute a logical plan and produce a Relation (a schema-aware iterator over a series of RecordBatch instances)
Auto Trait Implementations
impl !Send for ExecutionContext
impl !Sync for ExecutionContext
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> FromCast for T
fn from_cast(t: T) -> T
impl<T, U> Cast for T where
U: FromCast<T>,
U: FromCast<T>,
fn cast(self) -> U
impl<T, U> TryInto for T where
U: TryFrom<T>,
U: TryFrom<T>,