Package org.eclipse.rdf4j.query.algebra
Interface QueryModelNode
- All Superinterfaces:
Cloneable,Serializable
- All Known Subinterfaces:
AggregateOperator,ExclusiveTupleExpr,ExclusiveTupleExprRenderer,FedXTupleExpr,FilterTuple,FilterValueExpr,StatementTupleExpr,TupleExpr,UpdateExpr,ValueExpr
- All Known Implementing Classes:
AbstractAggregateOperator,AbstractNAryAggregateOperator,AbstractQueryModelNode,Add,AggregateFunctionCall,And,ArbitraryLengthPath,Avg,BinaryTupleOperator,BinaryValueOperator,BindingSetAssignment,BNodeGenerator,Bound,BoundFiltersNode,CheckStatementPattern,Clear,Coalesce,Compare,CompareAll,CompareAny,CompareSubQueryValueOperator,ConjunctiveFilterExpr,Copy,Count,Create,Datatype,DeleteData,DescribeOperator,Difference,Distinct,EmptyNJoin,EmptyNUnion,EmptySet,EmptyStatementPattern,ExclusiveArbitraryLengthPath,ExclusiveGroup,ExclusiveStatement,Exists,Extension,ExtensionElem,FederatedDescribeOperator,FedXArbitraryLengthPath,FedXLeftJoin,FedXService,FedXStatementPattern,FedXZeroLengthPath,Filter,FilterExpr,FunctionCall,Group,GroupConcat,GroupElem,HolderNode,If,In,InsertData,Intersection,IRIFunction,IsBNode,IsLiteral,IsNumeric,IsResource,IsURI,Join,Label,Lang,LangMatches,LeftJoin,ListMemberOperator,Load,LocalName,MathExpr,Max,Min,Modify,Move,MultiProjection,Namespace,NAryValueOperator,NJoin,Not,NTuple,NUnion,Or,Order,OrderElem,PassThroughTupleExpr,PrecompiledQueryNode,Projection,ProjectionElem,ProjectionElemList,QueryRoot,Reduced,Regex,SameTerm,Sample,Service,SingleSourceQuery,SingletonSet,Slice,StatementPattern,StatementSource,StatementSourcePattern,Str,SubQueryValueOperator,Sum,TripleRef,TrueStatementPattern,TupleFunctionCall,UnaryTupleOperator,UnaryValueOperator,Union,ValueConstant,ValueExprTripleRef,Var,ZeroLengthPath
Main interface for all query model nodes.
-
Method Summary
Modifier and TypeMethodDescriptionclone()Returns a (deep) clone of this query model node.booleanReturns true if this query model node and its children are recursively equal to o and its children.default doubledefault doublegetDoubleMetricActual(String metricName) default longdefault longdefault longdefault longdefault longdefault longdefault longgetLongMetricActual(String metricName) default longdefault longGets the node's parent.default longdefault doubleReturns the number of tuples that this QueryNode predicts will be outputted.Returns the signature of this query model node.default longdefault longdefault longdefault StringgetStringMetricActual(String metricName) default longdefault booleanvoidreplaceChildNode(QueryModelNode current, QueryModelNode replacement) Replaces one of the child nodes with a new node.voidreplaceWith(QueryModelNode replacement) Substitutes this node with a new node in the query model tree.default voidsetCostEstimate(double costEstimate) default voidsetDoubleMetricActual(String metricName, double metricValue) default voidsetHasNextCallCountActual(long hasNextCallCountActual) default voidsetHasNextTimeNanosActual(long hasNextTimeNanosActual) default voidsetHasNextTrueCountActual(long hasNextTrueCountActual) default voidsetJoinLeftBindingsConsumedActual(long joinLeftBindingsConsumedActual) default voidsetJoinRightBindingsConsumedActual(long joinRightBindingsConsumedActual) default voidsetJoinRightIteratorsCreatedActual(long joinRightIteratorsCreatedActual) default voidsetLongMetricActual(String metricName, long metricValue) default voidsetNextCallCountActual(long nextCallCountActual) default voidsetNextTimeNanosActual(long nextTimeNanosActual) voidsetParentNode(QueryModelNode parent) Sets the node's parent.default voidsetResultSizeActual(long resultSizeActual) default voidsetResultSizeEstimate(double rows) default voidsetRuntimeTelemetryEnabled(boolean runtimeTelemetryEnabled) default voidsetSourceRowsFilteredActual(long sourceRowsFilteredActual) default voidsetSourceRowsMatchedActual(long sourceRowsMatchedActual) default voidsetSourceRowsScannedActual(long sourceRowsScannedActual) default voidsetStringMetricActual(String metricName, String metricValue) default voidsetTotalTimeNanosActual(long totalTime) toString()Returns an indented print of the node tree, starting from this node.<X extends Exception>
voidvisit(QueryModelVisitor<X> visitor) Visits this node.<X extends Exception>
voidvisitChildren(QueryModelVisitor<X> visitor) Visits the children of this node.
-
Method Details
-
visit
Visits this node. The node reports itself to the visitor with the proper runtime type.- Throws:
X
-
visitChildren
Visits the children of this node. The node callsvisit(QueryModelVisitor)on all of its child nodes.- Throws:
X
-
getParentNode
QueryModelNode getParentNode()Gets the node's parent.- Returns:
- The parent node, if any.
-
setParentNode
Sets the node's parent.- Parameters:
parent- The parent node for this node.
-
replaceChildNode
Replaces one of the child nodes with a new node.- Parameters:
current- The current child node.replacement- The new child node.- Throws:
IllegalArgumentException- If current is not one of node's children.ClassCastException- If replacement is of an incompatible type.
-
replaceWith
Substitutes this node with a new node in the query model tree.- Parameters:
replacement- The new node.- Throws:
IllegalStateException- If this node does not have a parent node.ClassCastException- If replacement is of an incompatible type.
-
equals
Returns true if this query model node and its children are recursively equal to o and its children. -
toString
String toString()Returns an indented print of the node tree, starting from this node. -
getSignature
String getSignature()Returns the signature of this query model node. Signatures normally include the node's name and any parameters, but not parent or child nodes. This method is used bytoString().- Returns:
- The node's signature, e.g. SLICE (offset=10, limit=10).
-
clone
QueryModelNode clone()Returns a (deep) clone of this query model node. This method recursively clones the entire node tree, starting from this nodes.- Returns:
- A deep clone of this query model node.
-
getResultSizeEstimate
Returns the number of tuples that this QueryNode predicts will be outputted. For a StatementPattern this would be the estimated cardinality provided by the EvaluationStatistics. For a Join the would be the resulting number of joined tuples.- Returns:
- rows
-
setResultSizeEstimate
-
getResultSizeActual
-
setResultSizeActual
-
getCostEstimate
-
setCostEstimate
-
getTotalTimeNanosActual
-
setTotalTimeNanosActual
-
getHasNextCallCountActual
-
setHasNextCallCountActual
-
getHasNextTrueCountActual
-
setHasNextTrueCountActual
-
getHasNextTimeNanosActual
-
setHasNextTimeNanosActual
-
getNextCallCountActual
-
setNextCallCountActual
-
getNextTimeNanosActual
-
setNextTimeNanosActual
-
getJoinRightIteratorsCreatedActual
-
setJoinRightIteratorsCreatedActual
-
getJoinLeftBindingsConsumedActual
-
setJoinLeftBindingsConsumedActual
-
getJoinRightBindingsConsumedActual
-
setJoinRightBindingsConsumedActual
-
getSourceRowsScannedActual
-
setSourceRowsScannedActual
-
getSourceRowsMatchedActual
-
setSourceRowsMatchedActual
-
getSourceRowsFilteredActual
-
setSourceRowsFilteredActual
-
getLongMetricsActual
-
getLongMetricActual
-
setLongMetricActual
-
getDoubleMetricsActual
-
getDoubleMetricActual
-
setDoubleMetricActual
-
getStringMetricsActual
-
getStringMetricActual
-
setStringMetricActual
-
isRuntimeTelemetryEnabled
-
setRuntimeTelemetryEnabled
-