pub struct ExpandNode {
pub input: Arc<LogicalPlan>,
pub rel_type_name: String,
pub src_var: u32,
pub dst_var: u32,
pub edge_var: u32,
pub direction: Direction,
pub rel_ty: Option<u32>,
pub dir: PathBuf,
pub mode: OntologyMode,
pub edge_prop_count: usize,
/* private fields */
}Expand description
Physical node for adjacency-backed single-hop expansion (#763).
Emitted by the lowerer instead of the two-join chain whenever a project
read target is available. The physical ExpandExec (graphforge-exec) probes the
session adjacency provider per frontier row; that provider owns the
hit/miss/building fallback policy, so plan shape is stable across index
state and downstream LIMIT can cancel traversal work (#1248).
§Output schema (join-path parity)
Exactly what the join chain would have produced, in the same order: the
input’s qualified fields, then the edge topology fields (typed or
exploratory/wildcard) qualified var_<edge_var>, then persisted
edge-property fields (forced nullable — the join path LEFT-joins them)
also under var_<edge_var>, then the destination node’s topology fields
qualified var_<dst_var>. Destination type filtering and property joining
stay downstream in the binder’s trailing NodeScan{dst, ty} (#789),
exactly as on the join path.
For Undirected, ExpandExec collapses the provider’s duplicate self-loop
entries per input row, matching the relational union shape.
Fields§
§input: Arc<LogicalPlan>Input plan (the source node scan / prior pipeline).
rel_type_name: StringName of the relation type to expand along ("*" for wildcard).
src_var: u32Source node pattern-variable id (the frontier seed in the input).
dst_var: u32Destination node pattern-variable id (bound to the reached node).
edge_var: u32Edge pattern-variable id (bound per-column, like the join path).
direction: DirectionEdge traversal direction.
rel_ty: Option<u32>Resolved relation type id (TypeId.0), absent for wildcard expansion.
dir: PathBufProject directory the physical node reads from.
mode: OntologyModeOntology mode controlling the persisted edge layout.
edge_prop_count: usizeHow many of the var_<edge_var> fields are edge-property columns
(the trailing ones); the rest are edge topology columns.
Implementations§
Source§impl ExpandNode
impl ExpandNode
Sourcepub fn new(
input: Arc<LogicalPlan>,
rel_type_name: impl Into<String>,
src_var: u32,
dst_var: u32,
edge_var: u32,
direction: Direction,
rel_ty: Option<u32>,
dir: PathBuf,
mode: OntologyMode,
edge_fields: Vec<Arc<Field>>,
edge_prop_fields: Vec<Arc<Field>>,
dst_fields: Vec<Arc<Field>>,
) -> Self
pub fn new( input: Arc<LogicalPlan>, rel_type_name: impl Into<String>, src_var: u32, dst_var: u32, edge_var: u32, direction: Direction, rel_ty: Option<u32>, dir: PathBuf, mode: OntologyMode, edge_fields: Vec<Arc<Field>>, edge_prop_fields: Vec<Arc<Field>>, dst_fields: Vec<Arc<Field>>, ) -> Self
Create an adjacency-backed single-hop expand node.
edge_fields are the typed edge table’s topology columns and
edge_prop_fields the relation’s persisted property columns (the
lowerer discovers them from edge_properties/<REL>.parquet and forces
them nullable); dst_fields are the destination node’s topology
columns. Passed in so this crate need not depend on graphforge-storage.
Trait Implementations§
Source§impl Clone for ExpandNode
impl Clone for ExpandNode
Source§impl Debug for ExpandNode
impl Debug for ExpandNode
impl Eq for ExpandNode
Source§impl Hash for ExpandNode
impl Hash for ExpandNode
Source§impl PartialEq for ExpandNode
impl PartialEq for ExpandNode
Source§impl PartialOrd for ExpandNode
impl PartialOrd for ExpandNode
impl StructuralPartialEq for ExpandNode
Source§impl UserDefinedLogicalNodeCore for ExpandNode
impl UserDefinedLogicalNodeCore for ExpandNode
Source§fn inputs(&self) -> Vec<&LogicalPlan>
fn inputs(&self) -> Vec<&LogicalPlan>
Source§fn schema(&self) -> &DFSchemaRef
fn schema(&self) -> &DFSchemaRef
Source§fn expressions(&self) -> Vec<Expr>
fn expressions(&self) -> Vec<Expr>
Source§fn fmt_for_explain(&self, f: &mut Formatter<'_>) -> Result
fn fmt_for_explain(&self, f: &mut Formatter<'_>) -> Result
f for use in explain plan. Read moreSource§fn with_exprs_and_inputs(
&self,
_exprs: Vec<Expr>,
inputs: Vec<LogicalPlan>,
) -> DfResult<Self>
fn with_exprs_and_inputs( &self, _exprs: Vec<Expr>, inputs: Vec<LogicalPlan>, ) -> DfResult<Self>
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>
Source§fn prevent_predicate_push_down_columns(&self) -> HashSet<String>
fn prevent_predicate_push_down_columns(&self) -> HashSet<String>
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>>>
Source§fn supports_limit_pushdown(&self) -> bool
fn supports_limit_pushdown(&self) -> bool
true if a limit can be safely pushed down through this
UserDefinedLogicalNode node. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for ExpandNode
impl !UnwindSafe for ExpandNode
impl Freeze for ExpandNode
impl Send for ExpandNode
impl Sync for ExpandNode
impl Unpin for ExpandNode
impl UnsafeUnpin for ExpandNode
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§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
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> 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> ⓘ
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> ⓘ
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 moreimpl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
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)
Source§fn inputs(&self) -> Vec<&LogicalPlan>
fn inputs(&self) -> Vec<&LogicalPlan>
Source§fn check_invariants(&self, check: InvariantLevel) -> Result<(), DataFusionError>
fn check_invariants(&self, check: InvariantLevel) -> Result<(), DataFusionError>
Source§fn expressions(&self) -> Vec<Expr>
fn expressions(&self) -> Vec<Expr>
Source§fn prevent_predicate_push_down_columns(&self) -> HashSet<String>
fn prevent_predicate_push_down_columns(&self) -> HashSet<String>
Source§fn fmt_for_explain(&self, f: &mut Formatter<'_>) -> Result<(), Error>
fn fmt_for_explain(&self, f: &mut Formatter<'_>) -> Result<(), Error>
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>
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>>>
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>
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
true if a limit can be safely pushed down through this
UserDefinedLogicalNode node. Read more