pub struct MatchRecognizeSubstraitConsumer<'a> { /* private fields */ }Expand description
Substrait consumer that recognizes this package’s extension relation and delegates ordinary relations to DataFusion.
Most callers should use from_substrait_plan_with_match_recognize. This
type supports integrations that need to drive or customize the surrounding
Substrait traversal.
Implementations§
Source§impl<'a> MatchRecognizeSubstraitConsumer<'a>
impl<'a> MatchRecognizeSubstraitConsumer<'a>
Sourcepub fn new(extensions: &'a Extensions, state: &'a SessionState) -> Self
pub fn new(extensions: &'a Extensions, state: &'a SessionState) -> Self
Create a consumer using the plan’s decoded extensions and the
registries and catalog in state.
Trait Implementations§
Source§impl SubstraitConsumer for MatchRecognizeSubstraitConsumer<'_>
impl SubstraitConsumer for MatchRecognizeSubstraitConsumer<'_>
fn resolve_table_ref<'life0, 'life1, 'async_trait>(
&'life0 self,
table_ref: &'life1 TableReference,
) -> Pin<Box<dyn Future<Output = Result<Option<Arc<dyn TableProvider>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_extensions(&self) -> &Extensions
fn get_function_registry(&self) -> &impl FunctionRegistry
Source§fn push_outer_schema(&self, schema: Arc<DFSchema>)
fn push_outer_schema(&self, schema: Arc<DFSchema>)
Push an outer schema onto the stack when entering a subquery.
Source§fn pop_outer_schema(&self)
fn pop_outer_schema(&self)
Pop an outer schema from the stack when leaving a subquery.
Source§fn get_outer_schema(&self, steps_out: usize) -> Option<Arc<DFSchema>>
fn get_outer_schema(&self, steps_out: usize) -> Option<Arc<DFSchema>>
Get the outer schema at the given nesting depth.
steps_out = 1 is the immediately enclosing query, steps_out = 2
is two levels out, etc. Returns None if steps_out is 0 or
exceeds the current nesting depth (the caller should treat this as
an error in the Substrait plan).Source§fn push_lambda_parameters(
&self,
parameters: &[Type],
input_schema: &DFSchema,
) -> Result<Vec<String>>
fn push_lambda_parameters( &self, parameters: &[Type], input_schema: &DFSchema, ) -> Result<Vec<String>>
Push the given lambda parameters onto the stack when entering a lambda and
returns the names they got assigned Read more
Source§fn pop_lambda_parameters(&self)
fn pop_lambda_parameters(&self)
Pop lambda parameters from the stack when leaving a lambda.
Source§fn lambda_variable(&self, steps_out: usize, field_idx: usize) -> Result<Expr>
fn lambda_variable(&self, steps_out: usize, field_idx: usize) -> Result<Expr>
Returns an expression corresponding to the lambda variable with the given field_idx within the lambda it originates from,
at the lambda
step_outs of the current scope Read morefn consume_scalar_function<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
function: &'life1 ScalarFunction,
input_schema: &'life2 DFSchema,
) -> Pin<Box<dyn Future<Output = Result<Expr>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn consume_window_function<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
expr: &'life1 WindowFunction,
input_schema: &'life2 DFSchema,
) -> Pin<Box<dyn Future<Output = Result<Expr>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn consume_extension_single<'life0, 'life1, 'async_trait>(
&'life0 self,
rel: &'life1 ExtensionSingleRel,
) -> Pin<Box<dyn Future<Output = Result<LogicalPlan>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn consume_extension_leaf<'life0, 'life1, 'async_trait>(
&'life0 self,
rel: &'life1 ExtensionLeafRel,
) -> Pin<Box<dyn Future<Output = Result<LogicalPlan>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn consume_extension_multi<'life0, 'life1, 'async_trait>(
&'life0 self,
rel: &'life1 ExtensionMultiRel,
) -> Pin<Box<dyn Future<Output = Result<LogicalPlan>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn consume_rel<'life0, 'life1, 'async_trait>(
&'life0 self,
rel: &'life1 Rel,
) -> Pin<Box<dyn Future<Output = Result<LogicalPlan, DataFusionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn consume_rel<'life0, 'life1, 'async_trait>(
&'life0 self,
rel: &'life1 Rel,
) -> Pin<Box<dyn Future<Output = Result<LogicalPlan, DataFusionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
All Rels to be converted pass through this method.
You can provide your own implementation if you wish to customize the conversion behaviour.
fn consume_read<'life0, 'life1, 'async_trait>(
&'life0 self,
rel: &'life1 ReadRel,
) -> Pin<Box<dyn Future<Output = Result<LogicalPlan, DataFusionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn consume_filter<'life0, 'life1, 'async_trait>(
&'life0 self,
rel: &'life1 FilterRel,
) -> Pin<Box<dyn Future<Output = Result<LogicalPlan, DataFusionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn consume_fetch<'life0, 'life1, 'async_trait>(
&'life0 self,
rel: &'life1 FetchRel,
) -> Pin<Box<dyn Future<Output = Result<LogicalPlan, DataFusionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn consume_aggregate<'life0, 'life1, 'async_trait>(
&'life0 self,
rel: &'life1 AggregateRel,
) -> Pin<Box<dyn Future<Output = Result<LogicalPlan, DataFusionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn consume_sort<'life0, 'life1, 'async_trait>(
&'life0 self,
rel: &'life1 SortRel,
) -> Pin<Box<dyn Future<Output = Result<LogicalPlan, DataFusionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn consume_join<'life0, 'life1, 'async_trait>(
&'life0 self,
rel: &'life1 JoinRel,
) -> Pin<Box<dyn Future<Output = Result<LogicalPlan, DataFusionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn consume_project<'life0, 'life1, 'async_trait>(
&'life0 self,
rel: &'life1 ProjectRel,
) -> Pin<Box<dyn Future<Output = Result<LogicalPlan, DataFusionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn consume_set<'life0, 'life1, 'async_trait>(
&'life0 self,
rel: &'life1 SetRel,
) -> Pin<Box<dyn Future<Output = Result<LogicalPlan, DataFusionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn consume_cross<'life0, 'life1, 'async_trait>(
&'life0 self,
rel: &'life1 CrossRel,
) -> Pin<Box<dyn Future<Output = Result<LogicalPlan, DataFusionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn consume_consistent_partition_window<'life0, 'life1, 'async_trait>(
&'life0 self,
_rel: &'life1 ConsistentPartitionWindowRel,
) -> Pin<Box<dyn Future<Output = Result<LogicalPlan, DataFusionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn consume_exchange<'life0, 'life1, 'async_trait>(
&'life0 self,
rel: &'life1 ExchangeRel,
) -> Pin<Box<dyn Future<Output = Result<LogicalPlan, DataFusionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Source§fn consume_expression<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
expr: &'life1 Expression,
input_schema: &'life2 DFSchema,
) -> Pin<Box<dyn Future<Output = Result<Expr, DataFusionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn consume_expression<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
expr: &'life1 Expression,
input_schema: &'life2 DFSchema,
) -> Pin<Box<dyn Future<Output = Result<Expr, DataFusionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
All Expressions to be converted pass through this method.
You can provide your own implementation if you wish to customize the conversion behaviour.
fn consume_literal<'life0, 'life1, 'async_trait>(
&'life0 self,
expr: &'life1 Literal,
) -> Pin<Box<dyn Future<Output = Result<Expr, DataFusionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn consume_field_reference<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
expr: &'life1 FieldReference,
input_schema: &'life2 DFSchema,
) -> Pin<Box<dyn Future<Output = Result<Expr, DataFusionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn consume_if_then<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
expr: &'life1 IfThen,
input_schema: &'life2 DFSchema,
) -> Pin<Box<dyn Future<Output = Result<Expr, DataFusionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn consume_switch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_expr: &'life1 SwitchExpression,
_input_schema: &'life2 DFSchema,
) -> Pin<Box<dyn Future<Output = Result<Expr, DataFusionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn consume_singular_or_list<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
expr: &'life1 SingularOrList,
input_schema: &'life2 DFSchema,
) -> Pin<Box<dyn Future<Output = Result<Expr, DataFusionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn consume_multi_or_list<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_expr: &'life1 MultiOrList,
_input_schema: &'life2 DFSchema,
) -> Pin<Box<dyn Future<Output = Result<Expr, DataFusionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn consume_cast<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
expr: &'life1 Cast,
input_schema: &'life2 DFSchema,
) -> Pin<Box<dyn Future<Output = Result<Expr, DataFusionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn consume_subquery<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
expr: &'life1 Subquery,
input_schema: &'life2 DFSchema,
) -> Pin<Box<dyn Future<Output = Result<Expr, DataFusionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn consume_nested<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
expr: &'life1 Nested,
input_schema: &'life2 DFSchema,
) -> Pin<Box<dyn Future<Output = Result<Expr, DataFusionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn consume_enum<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_expr: &'life1 Enum,
_input_schema: &'life2 DFSchema,
) -> Pin<Box<dyn Future<Output = Result<Expr, DataFusionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn consume_dynamic_parameter<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
expr: &'life1 DynamicParameter,
_input_schema: &'life2 DFSchema,
) -> Pin<Box<dyn Future<Output = Result<Expr, DataFusionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn consume_lambda<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
expr: &'life1 Lambda,
input_schema: &'life2 DFSchema,
) -> Pin<Box<dyn Future<Output = Result<Expr, DataFusionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn consume_user_defined_type( &self, user_defined_type: &UserDefined, ) -> Result<DataType, DataFusionError>
Source§fn consume_type_metadata(
&self,
_typ: &Type,
) -> Result<Option<HashMap<String, String>>, DataFusionError>
fn consume_type_metadata( &self, _typ: &Type, ) -> Result<Option<HashMap<String, String>>, DataFusionError>
Optional Arrow field metadata for a Substrait type. Read more
fn consume_user_defined_literal( &self, user_defined_literal: &UserDefined, ) -> Result<ScalarValue, DataFusionError>
Auto Trait Implementations§
impl<'a> !Freeze for MatchRecognizeSubstraitConsumer<'a>
impl<'a> !RefUnwindSafe for MatchRecognizeSubstraitConsumer<'a>
impl<'a> !UnwindSafe for MatchRecognizeSubstraitConsumer<'a>
impl<'a> Forget for MatchRecognizeSubstraitConsumer<'a>
impl<'a> Move for MatchRecognizeSubstraitConsumer<'a>
impl<'a> Send for MatchRecognizeSubstraitConsumer<'a>
impl<'a> Sync for MatchRecognizeSubstraitConsumer<'a>
impl<'a> Unpin for MatchRecognizeSubstraitConsumer<'a>
impl<'a> UnsafeUnpin for MatchRecognizeSubstraitConsumer<'a>where
&'a Extensions: UnsafeUnpin,
&'a SessionState: UnsafeUnpin,
Align4<u32>: UnsafeUnpin,
Align1<u8>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<Arc<DFSchema>>: UnsafeUnpin,
PhantomData<Vec<Arc<Field>>>: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more