pub struct QuadPatternNode { /* private fields */ }
Expand description
A logical node that represents a scan of quads matching a pattern.
This node is the main entry point for accessing RDF data in the query plan.
It is responsible for retrieving quads from the underlying storage that match
the given active_graph
and pattern
.
§Blank Node Matching
The blank_node_mode
determines how blank nodes in the pattern are handled.
See BlankNodeMatchingMode for more details.
§Planning QuadPatternNode
Planning the QuadPatternNode requires users to define a specialized planner for the used storage layer. This is because the planner should consider storage-specific problems like sharing a transaction across multiple scans of the quads table in a single query. The built-in storage layers of RDF Fusion provide examples.
Implementations§
Source§impl QuadPatternNode
impl QuadPatternNode
Sourcepub fn new(
storage_encoding: QuadStorageEncoding,
active_graph: ActiveGraph,
graph_variable: Option<Variable>,
pattern: TriplePattern,
) -> QuadPatternNode
pub fn new( storage_encoding: QuadStorageEncoding, active_graph: ActiveGraph, graph_variable: Option<Variable>, pattern: TriplePattern, ) -> QuadPatternNode
Creates a new QuadPatternNode.
Sourcepub fn new_with_blank_nodes_as_filter(
storage_encoding: QuadStorageEncoding,
active_graph: ActiveGraph,
graph_variable: Option<Variable>,
pattern: TriplePattern,
) -> QuadPatternNode
pub fn new_with_blank_nodes_as_filter( storage_encoding: QuadStorageEncoding, active_graph: ActiveGraph, graph_variable: Option<Variable>, pattern: TriplePattern, ) -> QuadPatternNode
Creates a new QuadPatternNode.
Contrary to Self::new, blank nodes are not treated as a variable. They are used for filtering the quad set.
Sourcepub fn new_all_quads(
storage_encoding: QuadStorageEncoding,
active_graph: ActiveGraph,
) -> QuadPatternNode
pub fn new_all_quads( storage_encoding: QuadStorageEncoding, active_graph: ActiveGraph, ) -> QuadPatternNode
Creates a new QuadPatternNode that returns all quads in active_graph
using the default
quads schema.
Sourcepub fn active_graph(&self) -> &ActiveGraph
pub fn active_graph(&self) -> &ActiveGraph
The active graph to query.
Sourcepub fn graph_variable(&self) -> Option<VariableRef<'_>>
pub fn graph_variable(&self) -> Option<VariableRef<'_>>
The result mode of the QuadPatternNode.
Sourcepub fn pattern(&self) -> &TriplePattern
pub fn pattern(&self) -> &TriplePattern
The triple pattern to match.
Sourcepub fn blank_node_mode(&self) -> BlankNodeMatchingMode
pub fn blank_node_mode(&self) -> BlankNodeMatchingMode
The blank node matching mode.
Trait Implementations§
Source§impl Debug for QuadPatternNode
impl Debug for QuadPatternNode
Source§impl Hash for QuadPatternNode
impl Hash for QuadPatternNode
Source§impl PartialEq for QuadPatternNode
impl PartialEq for QuadPatternNode
Source§impl PartialOrd for QuadPatternNode
impl PartialOrd for QuadPatternNode
Source§impl UserDefinedLogicalNodeCore for QuadPatternNode
impl UserDefinedLogicalNodeCore for QuadPatternNode
Source§fn inputs(&self) -> Vec<&LogicalPlan>
fn inputs(&self) -> Vec<&LogicalPlan>
Source§fn expressions(&self) -> Vec<Expr>
fn expressions(&self) -> Vec<Expr>
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<QuadPatternNode, DataFusionError>
fn with_exprs_and_inputs( &self, exprs: Vec<Expr>, inputs: Vec<LogicalPlan>, ) -> Result<QuadPatternNode, 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 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 moreimpl Eq for QuadPatternNode
impl StructuralPartialEq for QuadPatternNode
Auto Trait Implementations§
impl Freeze for QuadPatternNode
impl RefUnwindSafe for QuadPatternNode
impl Send for QuadPatternNode
impl Sync for QuadPatternNode
impl Unpin for QuadPatternNode
impl UnwindSafe for QuadPatternNode
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
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<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> 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
fn dyn_ord(&self, other: &dyn UserDefinedLogicalNode) -> Option<Ordering>
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