Struct datafusion::execution::dataframe_impl::DataFrameImpl
source · [−]pub struct DataFrameImpl { /* private fields */ }
Expand description
Implementation of DataFrame API
Implementations
sourceimpl DataFrameImpl
impl DataFrameImpl
sourcepub fn new(
ctx_state: Arc<Mutex<ExecutionContextState>>,
plan: &LogicalPlan
) -> Self
pub fn new(
ctx_state: Arc<Mutex<ExecutionContextState>>,
plan: &LogicalPlan
) -> Self
Create a new Table based on an existing logical plan
Trait Implementations
sourceimpl DataFrame for DataFrameImpl
impl DataFrame for DataFrameImpl
sourcefn select_columns(&self, columns: &[&str]) -> Result<Arc<dyn DataFrame>>
fn select_columns(&self, columns: &[&str]) -> Result<Arc<dyn DataFrame>>
Apply a projection based on a list of column names
sourcefn select(&self, expr_list: Vec<Expr>) -> Result<Arc<dyn DataFrame>>
fn select(&self, expr_list: Vec<Expr>) -> Result<Arc<dyn DataFrame>>
Create a projection based on arbitrary expressions
sourcefn filter(&self, predicate: Expr) -> Result<Arc<dyn DataFrame>>
fn filter(&self, predicate: Expr) -> Result<Arc<dyn DataFrame>>
Create a filter based on a predicate expression
sourcefn aggregate(
&self,
group_expr: Vec<Expr>,
aggr_expr: Vec<Expr>
) -> Result<Arc<dyn DataFrame>>
fn aggregate(
&self,
group_expr: Vec<Expr>,
aggr_expr: Vec<Expr>
) -> Result<Arc<dyn DataFrame>>
Perform an aggregate query
sourcefn sort(&self, expr: Vec<Expr>) -> Result<Arc<dyn DataFrame>>
fn sort(&self, expr: Vec<Expr>) -> Result<Arc<dyn DataFrame>>
Sort by specified sorting expressions
sourcefn join(
&self,
right: Arc<dyn DataFrame>,
join_type: JoinType,
left_cols: &[&str],
right_cols: &[&str]
) -> Result<Arc<dyn DataFrame>>
fn join(
&self,
right: Arc<dyn DataFrame>,
join_type: JoinType,
left_cols: &[&str],
right_cols: &[&str]
) -> Result<Arc<dyn DataFrame>>
Join with another DataFrame
sourcefn to_logical_plan(&self) -> LogicalPlan
fn to_logical_plan(&self) -> LogicalPlan
Convert to logical plan
sourcefn collect<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Vec<RecordBatch>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn collect<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Vec<RecordBatch>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Convert the logical plan represented by this DataFrame into a physical plan and execute it, collecting all resulting batches into memory
sourcefn show<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn show<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Print results.
sourcefn show_limit<'life0, 'async_trait>(
&'life0 self,
num: usize
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn show_limit<'life0, 'async_trait>(
&'life0 self,
num: usize
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Print results and limit rows.
sourcefn execute_stream<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<SendableRecordBatchStream>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn execute_stream<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<SendableRecordBatchStream>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Convert the logical plan represented by this DataFrame into a physical plan and execute it, returning a stream over a single partition
sourcefn collect_partitioned<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<RecordBatch>>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn collect_partitioned<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<RecordBatch>>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Convert the logical plan represented by this DataFrame into a physical plan and execute it, collecting all resulting batches into memory while maintaining partitioning
sourcefn execute_stream_partitioned<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Vec<SendableRecordBatchStream>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn execute_stream_partitioned<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Vec<SendableRecordBatchStream>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Convert the logical plan represented by this DataFrame into a physical plan and execute it, returning a stream for each partition
sourcefn repartition(
&self,
partitioning_scheme: Partitioning
) -> Result<Arc<dyn DataFrame>>
fn repartition(
&self,
partitioning_scheme: Partitioning
) -> Result<Arc<dyn DataFrame>>
Repartition a DataFrame based on a logical partitioning scheme. Read more
sourcefn explain(&self, verbose: bool, analyze: bool) -> Result<Arc<dyn DataFrame>>
fn explain(&self, verbose: bool, analyze: bool) -> Result<Arc<dyn DataFrame>>
Return a DataFrame with the explanation of its plan so far. Read more
sourcefn registry(&self) -> Arc<dyn FunctionRegistry>
fn registry(&self) -> Arc<dyn FunctionRegistry>
Return a FunctionRegistry
used to plan udf’s calls Read more
sourceimpl TableProvider for DataFrameImpl
impl TableProvider for DataFrameImpl
sourcefn table_type(&self) -> TableType
fn table_type(&self) -> TableType
Get the type of this table for metadata/catalog purposes.
sourcefn scan<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
projection: &'life1 Option<Vec<usize>>,
filters: &'life2 [Expr],
limit: Option<usize>
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn ExecutionPlan>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn scan<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
projection: &'life1 Option<Vec<usize>>,
filters: &'life2 [Expr],
limit: Option<usize>
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn ExecutionPlan>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Create an ExecutionPlan that will scan the table. The table provider will be usually responsible of grouping the source data into partitions that can be efficiently parallelized or distributed. Read more
sourcefn supports_filter_pushdown(
&self,
_filter: &Expr
) -> Result<TableProviderFilterPushDown>
fn supports_filter_pushdown(
&self,
_filter: &Expr
) -> Result<TableProviderFilterPushDown>
Tests whether the table provider can make use of a filter expression to optimise data retrieval. Read more
Auto Trait Implementations
impl !RefUnwindSafe for DataFrameImpl
impl Send for DataFrameImpl
impl Sync for DataFrameImpl
impl Unpin for DataFrameImpl
impl !UnwindSafe for DataFrameImpl
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more