pub struct GraphAlgorithmNode {
pub graph: String,
pub input: Arc<LogicalPlan>,
pub weighted: Option<Arc<LogicalPlan>>,
pub vertices: Option<Arc<LogicalPlan>>,
pub values: Option<Arc<LogicalPlan>>,
pub source: Expr,
pub destination: Expr,
pub weights: Vec<String>,
pub outputs: Vec<Output>,
pub per_node: bool,
pub id_type: DataType,
/* private fields */
}Expand description
Run graph functions over the edges its input produces.
Fields§
§graph: StringThe graph’s name, for plans and messages. The index is keyed by the edges, not by this.
input: Arc<LogicalPlan>The edge rows, projected to the endpoints.
weighted: Option<Arc<LogicalPlan>>The edge rows projected to the endpoints and the weights, when an output reads a weight (see the module docs).
vertices: Option<Arc<LogicalPlan>>The graph’s vertex table projected to its key, one column, when it has one: its keys are the graph’s nodes (see the module docs).
values: Option<Arc<LogicalPlan>>The node values a neighbour aggregation reads: a plan of two columns, node ids then values.
source: ExprThe source and destination of each edge: column references into
input.
destination: Expr§weights: Vec<String>The distinct weight expressions, as written, for EXPLAIN.
outputs: Vec<Output>What the node computes, one value column each.
per_node: boolOne row per node with an id column, or one row for the whole graph.
id_type: DataTypeThe node id type: the endpoints’ type, with every integer type read as
Int64 and every string type as Utf8, as the Python library reads
them.
Implementations§
Source§impl GraphAlgorithmNode
impl GraphAlgorithmNode
pub fn try_new( graph: String, input: Arc<LogicalPlan>, weighted: Option<Arc<LogicalPlan>>, vertices: Option<Arc<LogicalPlan>>, values: Option<Arc<LogicalPlan>>, source: Expr, destination: Expr, weights: Vec<String>, outputs: Vec<Output>, per_node: bool, ) -> Result<Self>
Sourcepub fn endpoint_indices(&self) -> Result<(usize, usize)>
pub fn endpoint_indices(&self) -> Result<(usize, usize)>
The positions of the source and destination columns in the input.
Trait Implementations§
Source§impl Clone for GraphAlgorithmNode
impl Clone for GraphAlgorithmNode
Source§impl Debug for GraphAlgorithmNode
impl Debug for GraphAlgorithmNode
impl Eq for GraphAlgorithmNode
Source§impl Hash for GraphAlgorithmNode
impl Hash for GraphAlgorithmNode
Source§impl PartialEq for GraphAlgorithmNode
impl PartialEq for GraphAlgorithmNode
Source§impl PartialOrd for GraphAlgorithmNode
impl PartialOrd for GraphAlgorithmNode
Source§impl UserDefinedLogicalNodeCore for GraphAlgorithmNode
impl UserDefinedLogicalNodeCore for GraphAlgorithmNode
Source§fn expressions(&self) -> Vec<Expr>
fn expressions(&self) -> Vec<Expr>
The endpoint columns, so DataFusion keeps them in the input.
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>>>
Every output needs both endpoints and nothing else of the first input, every column of the weighted input, the vertex key, and both columns of the values.
Source§fn prevent_predicate_push_down_columns(&self) -> HashSet<String>
fn prevent_predicate_push_down_columns(&self) -> HashSet<String>
Filters on the output are about nodes, not edges: none moves below.
Source§fn inputs(&self) -> Vec<&LogicalPlan>
fn inputs(&self) -> Vec<&LogicalPlan>
Source§fn schema(&self) -> &DFSchemaRef
fn schema(&self) -> &DFSchemaRef
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>,
) -> Result<Self>
fn with_exprs_and_inputs( &self, exprs: Vec<Expr>, inputs: Vec<LogicalPlan>, ) -> Result<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 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 GraphAlgorithmNode
impl !UnwindSafe for GraphAlgorithmNode
impl Forget for GraphAlgorithmNode
impl Freeze for GraphAlgorithmNode
impl Send for GraphAlgorithmNode
impl Sync for GraphAlgorithmNode
impl Unpin for GraphAlgorithmNode
impl UnsafeUnpin for GraphAlgorithmNode
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§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> 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> ⓘ
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<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