pub struct GraphCreateNode {
pub input: Arc<LogicalPlan>,
pub nodes: Vec<ResolvedNodeSpec>,
pub edges: Vec<ResolvedEdgeSpec>,
pub dir: PathBuf,
pub mode: OntologyMode,
/* private fields */
}Expand description
Logical node for CREATE: a write specification driven by an input plan.
Carries the resolved node/edge specs plus the project directory and ontology
mode needed to drive a writer. The directory is baked in at lowering time
because the physical-planning layer (an ExtensionPlanner) only sees the
DataFusion session state, not the GraphForge project path.
§Input
The CREATE runs once per input row (#703): a standalone CREATE (:X)
lowers over the implicit single unit row (so it creates exactly once), while
a mixed MATCH … CREATE … runs the write once per matched row, referencing
MATCH-bound vars’ identities (ResolvedNodeSpec::is_reference) and minting
the rest. The input columns are consumed (for cardinality + referenced
identities), not projected — the node still emits only the write summary.
Output schema is a one-row write summary: nodes_created / edges_created
(UInt64).
Fields§
§input: Arc<LogicalPlan>Input plan whose rows drive the writes (the implicit unit row for a standalone CREATE; the MATCH results for a mixed pipeline).
nodes: Vec<ResolvedNodeSpec>Nodes to create, in pattern order.
edges: Vec<ResolvedEdgeSpec>Edges to create, in pattern order.
dir: PathBufTarget project directory.
mode: OntologyModeOntology mode (drives writer edge / property routing).
Implementations§
Source§impl GraphCreateNode
impl GraphCreateNode
Sourcepub fn summary_schema() -> Arc<Schema> ⓘ
pub fn summary_schema() -> Arc<Schema> ⓘ
Build the write-summary Arrow schema
(nodes_created, edges_created, properties_set, labels_added).
Sourcepub fn new(
input: Arc<LogicalPlan>,
nodes: Vec<ResolvedNodeSpec>,
edges: Vec<ResolvedEdgeSpec>,
dir: PathBuf,
mode: OntologyMode,
) -> Self
pub fn new( input: Arc<LogicalPlan>, nodes: Vec<ResolvedNodeSpec>, edges: Vec<ResolvedEdgeSpec>, dir: PathBuf, mode: OntologyMode, ) -> Self
Create a new graph-create node over input in summary mode: the node
emits the one-row write summary (a terminal CREATE).
Sourcepub fn new_emitting(
input: Arc<LogicalPlan>,
nodes: Vec<ResolvedNodeSpec>,
edges: Vec<ResolvedEdgeSpec>,
dir: PathBuf,
mode: OntologyMode,
output_schema: DFSchemaRef,
) -> Self
pub fn new_emitting( input: Arc<LogicalPlan>, nodes: Vec<ResolvedNodeSpec>, edges: Vec<ResolvedEdgeSpec>, dir: PathBuf, mode: OntologyMode, output_schema: DFSchemaRef, ) -> Self
Create a node in emit-rows mode (write-result RETURN, #814): instead
of the summary, it emits one row per input row carrying the input columns
plus the created variables’ var_<n>-qualified identity + property columns
(output_schema), so a following RETURN/WITH can read them. Side
effects are reported out of band (the exec’s tally), since a relation
cannot also carry the summary.
Sourcepub fn emits_rows(&self) -> bool
pub fn emits_rows(&self) -> bool
Whether this node emits created-entity rows (true) rather than the
one-row write summary (false).
Trait Implementations§
Source§impl Clone for GraphCreateNode
impl Clone for GraphCreateNode
Source§impl Debug for GraphCreateNode
impl Debug for GraphCreateNode
impl Eq for GraphCreateNode
Source§impl Hash for GraphCreateNode
impl Hash for GraphCreateNode
Source§impl PartialEq for GraphCreateNode
impl PartialEq for GraphCreateNode
Source§impl PartialOrd for GraphCreateNode
impl PartialOrd for GraphCreateNode
Source§impl UserDefinedLogicalNodeCore for GraphCreateNode
impl UserDefinedLogicalNodeCore for GraphCreateNode
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 GraphCreateNode
impl !UnwindSafe for GraphCreateNode
impl Freeze for GraphCreateNode
impl Send for GraphCreateNode
impl Sync for GraphCreateNode
impl Unpin for GraphCreateNode
impl UnsafeUnpin for GraphCreateNode
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