pub struct LookupJoinNode { /* private fields */ }Expand description
Custom logical plan node for a lookup join.
Represents a join between a streaming input plan and a lookup table. The lookup table is not a DataFusion table; it is resolved at execution time via the lookup source connector.
Implementations§
Source§impl LookupJoinNode
impl LookupJoinNode
Sourcepub fn new(
input: LogicalPlan,
lookup_table: String,
lookup_schema: DFSchemaRef,
join_keys: Vec<JoinKeyPair>,
join_type: LookupJoinType,
pushdown_predicates: Vec<Expr>,
required_lookup_columns: HashSet<String>,
output_schema: DFSchemaRef,
metadata: LookupTableMetadata,
) -> Self
pub fn new( input: LogicalPlan, lookup_table: String, lookup_schema: DFSchemaRef, join_keys: Vec<JoinKeyPair>, join_type: LookupJoinType, pushdown_predicates: Vec<Expr>, required_lookup_columns: HashSet<String>, output_schema: DFSchemaRef, metadata: LookupTableMetadata, ) -> Self
Creates a new lookup join node.
Sourcepub fn with_local_predicates(self, predicates: Vec<Expr>) -> Self
pub fn with_local_predicates(self, predicates: Vec<Expr>) -> Self
Sets predicates to be evaluated locally after the join.
Sourcepub fn with_aliases(
self,
lookup_alias: Option<String>,
stream_alias: Option<String>,
) -> Self
pub fn with_aliases( self, lookup_alias: Option<String>, stream_alias: Option<String>, ) -> Self
Sets table aliases for qualified column resolution.
Sourcepub fn lookup_table_name(&self) -> &str
pub fn lookup_table_name(&self) -> &str
Returns the lookup table name.
Sourcepub fn join_keys(&self) -> &[JoinKeyPair]
pub fn join_keys(&self) -> &[JoinKeyPair]
Returns the join key pairs.
Sourcepub fn join_type(&self) -> LookupJoinType
pub fn join_type(&self) -> LookupJoinType
Returns the join type.
Sourcepub fn pushdown_predicates(&self) -> &[Expr]
pub fn pushdown_predicates(&self) -> &[Expr]
Returns the pushdown predicates.
Sourcepub fn required_lookup_columns(&self) -> &HashSet<String>
pub fn required_lookup_columns(&self) -> &HashSet<String>
Returns the required lookup columns.
Sourcepub fn metadata(&self) -> &LookupTableMetadata
pub fn metadata(&self) -> &LookupTableMetadata
Returns the lookup table metadata.
Sourcepub fn lookup_schema(&self) -> &DFSchemaRef
pub fn lookup_schema(&self) -> &DFSchemaRef
Returns the lookup table schema.
Sourcepub fn local_predicates(&self) -> &[Expr]
pub fn local_predicates(&self) -> &[Expr]
Returns the local predicates (evaluated after the join).
Sourcepub fn lookup_alias(&self) -> Option<&str>
pub fn lookup_alias(&self) -> Option<&str>
Returns the lookup table alias.
Sourcepub fn stream_alias(&self) -> Option<&str>
pub fn stream_alias(&self) -> Option<&str>
Returns the stream input alias.
Trait Implementations§
Source§impl Clone for LookupJoinNode
impl Clone for LookupJoinNode
Source§fn clone(&self) -> LookupJoinNode
fn clone(&self) -> LookupJoinNode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LookupJoinNode
impl Debug for LookupJoinNode
Source§impl Hash for LookupJoinNode
impl Hash for LookupJoinNode
Source§impl PartialEq for LookupJoinNode
impl PartialEq for LookupJoinNode
Source§impl PartialOrd for LookupJoinNode
impl PartialOrd for LookupJoinNode
Source§impl UserDefinedLogicalNodeCore for LookupJoinNode
impl UserDefinedLogicalNodeCore for LookupJoinNode
Source§fn inputs(&self) -> Vec<&LogicalPlan>
fn inputs(&self) -> Vec<&LogicalPlan>
Return the logical plan’s inputs.
Source§fn schema(&self) -> &DFSchemaRef
fn schema(&self) -> &DFSchemaRef
Return the output schema of this logical plan node.
Source§fn expressions(&self) -> Vec<Expr>
fn expressions(&self) -> Vec<Expr>
Returns all expressions in the current logical plan node. This
should not include expressions of any inputs (aka
non-recursively). These expressions are used for optimizer
passes and rewrites.
Source§fn fmt_for_explain(&self, f: &mut Formatter<'_>) -> Result
fn fmt_for_explain(&self, f: &mut Formatter<'_>) -> Result
Write a single line, human readable string to
f for use in explain plan. Read moreSource§fn with_exprs_and_inputs(
&self,
exprs: Vec<Expr>,
inputs: Vec<LogicalPlan>,
) -> Result<Self>
fn with_exprs_and_inputs( &self, exprs: Vec<Expr>, inputs: Vec<LogicalPlan>, ) -> Result<Self>
Create a new
UserDefinedLogicalNode with the specified children
and expressions. This function is used during optimization
when the plan is being rewritten and a new instance of the
UserDefinedLogicalNode must be created. Read moreSource§fn check_invariants(
&self,
_check: InvariantLevel,
) -> Result<(), DataFusionError>
fn check_invariants( &self, _check: InvariantLevel, ) -> Result<(), DataFusionError>
Perform check of invariants for the extension node. Read more
Source§fn prevent_predicate_push_down_columns(&self) -> HashSet<String>
fn prevent_predicate_push_down_columns(&self) -> HashSet<String>
A list of output columns (e.g. the names of columns in
self.schema()) for which predicates can not be pushed below
this node without changing the output. Read more
Source§fn necessary_children_exprs(
&self,
_output_columns: &[usize],
) -> Option<Vec<Vec<usize>>>
fn necessary_children_exprs( &self, _output_columns: &[usize], ) -> Option<Vec<Vec<usize>>>
Returns the necessary input columns for this node required to compute
the columns in the output schema Read more
Source§fn supports_limit_pushdown(&self) -> bool
fn supports_limit_pushdown(&self) -> bool
Returns
true if a limit can be safely pushed down through this
UserDefinedLogicalNode node. Read moreimpl Eq for LookupJoinNode
Auto Trait Implementations§
impl Freeze for LookupJoinNode
impl !RefUnwindSafe for LookupJoinNode
impl Send for LookupJoinNode
impl Sync for LookupJoinNode
impl Unpin for LookupJoinNode
impl UnsafeUnpin for LookupJoinNode
impl !UnwindSafe for LookupJoinNode
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Returns whether the given value has been niched. Read more
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
Writes data to
out indicating that a T is niched.Source§impl<T> UserDefinedLogicalNode for Twhere
T: UserDefinedLogicalNodeCore,
impl<T> UserDefinedLogicalNode for Twhere
T: UserDefinedLogicalNodeCore,
Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Return a reference to self as Any, to support dynamic downcasting Read more
Source§fn inputs(&self) -> Vec<&LogicalPlan>
fn inputs(&self) -> Vec<&LogicalPlan>
Return the logical plan’s inputs.
Source§fn check_invariants(&self, check: InvariantLevel) -> Result<(), DataFusionError>
fn check_invariants(&self, check: InvariantLevel) -> Result<(), DataFusionError>
Perform check of invariants for the extension node.
Source§fn expressions(&self) -> Vec<Expr>
fn expressions(&self) -> Vec<Expr>
Returns all expressions in the current logical plan node. This should
not include expressions of any inputs (aka non-recursively). Read more
Source§fn prevent_predicate_push_down_columns(&self) -> HashSet<String>
fn prevent_predicate_push_down_columns(&self) -> HashSet<String>
A list of output columns (e.g. the names of columns in
self.schema()) for which predicates can not be pushed below
this node without changing the output. Read more
Source§fn fmt_for_explain(&self, f: &mut Formatter<'_>) -> Result<(), Error>
fn fmt_for_explain(&self, f: &mut Formatter<'_>) -> Result<(), Error>
Write a single line, human readable string to
f for use in explain plan. Read moreSource§fn with_exprs_and_inputs(
&self,
exprs: Vec<Expr>,
inputs: Vec<LogicalPlan>,
) -> Result<Arc<dyn UserDefinedLogicalNode>, DataFusionError>
fn with_exprs_and_inputs( &self, exprs: Vec<Expr>, inputs: Vec<LogicalPlan>, ) -> Result<Arc<dyn UserDefinedLogicalNode>, DataFusionError>
Create a new
UserDefinedLogicalNode with the specified children
and expressions. This function is used during optimization
when the plan is being rewritten and a new instance of the
UserDefinedLogicalNode must be created. Read moreSource§fn necessary_children_exprs(
&self,
output_columns: &[usize],
) -> Option<Vec<Vec<usize>>>
fn necessary_children_exprs( &self, output_columns: &[usize], ) -> Option<Vec<Vec<usize>>>
Returns the necessary input columns for this node required to compute
the columns in the output schema Read more
Source§fn dyn_eq(&self, other: &dyn UserDefinedLogicalNode) -> bool
fn dyn_eq(&self, other: &dyn UserDefinedLogicalNode) -> bool
Source§fn dyn_ord(&self, other: &dyn UserDefinedLogicalNode) -> Option<Ordering>
fn dyn_ord(&self, other: &dyn UserDefinedLogicalNode) -> Option<Ordering>
Compare
other, respecting requirements from PartialOrd.
Must return Some(Equal) if and only if self.dyn_eq(other).Source§fn supports_limit_pushdown(&self) -> bool
fn supports_limit_pushdown(&self) -> bool
Returns
true if a limit can be safely pushed down through this
UserDefinedLogicalNode node. Read more