public class UnionNode extends GraphPatternGroup<JoinGroupNode> implements IReorderableNode
IGroupNode
that represents the sparql union
operator.
Note: This node only accepts JoinGroupNode
s as children.
GraphPatternGroup.Annotations
IQueryNode.Annotations
DEFAULT_INITIAL_CAPACITY
Constructor and Description |
---|
UnionNode() |
UnionNode(BOp[] args,
Map<String,Object> anns)
Required shallow copy constructor.
|
UnionNode(UnionNode op)
Constructor required for
com.bigdata.bop.BOpUtility#deepCopy(FilterNode) . |
Modifier and Type | Method and Description |
---|---|
void |
addArg(BOp newArg)
Add a new argument (core mutation method).
|
void |
addArg(int index,
BOp newArg)
Add a new argument (core mutation method) at the specified index.
|
UnionNode |
addChild(JoinGroupNode child)
Add a child to this group.
|
Set<IVariable<?>> |
getDesiredBound(StaticAnalysis sa)
Get variables that are not required to be bound, but desired in the
sense that we want them to be bound when evaluating the construct.
|
long |
getEstimatedCardinality(StaticOptimizer optimizer)
Return the estimated cardinality - either the range count of a
statement pattern or some computed estimated cardinality for a join
group.
|
Set<IVariable<?>> |
getRequiredBound(StaticAnalysis sa)
Return the variables used in the node that *must* be bound prior to
evaluating the node.
|
boolean |
isMinus()
Returns
false . |
boolean |
isOptional()
Returns
false . |
boolean |
isReorderable()
The decision about whether to re-order can no longer be made simply
by examining the type - individual instances of a particular type
may or may not be reorderable.
|
int |
replaceWith(BOp oldChild,
BOp newChild)
Replace a child of a node with another reference (destructive
modification).
|
getChildren, getJoinVars, getProjectInVars, setJoinVars, setProjectInVars
clone, getAttachedJoinFilters, getChildren, isEmpty, iterator, removeArg, removeChild, setArg, setAttachedJoinFilters, size, toString
getContext, getParent, getParentGraphPatternGroup, getParentJoinGroup, setParent
getQueryHints, toString
addExplainHint, getExplainHints, getQueryHint, getQueryHint, getQueryHintAsBoolean, getQueryHintAsBoolean, getQueryHintAsInteger, replaceAllWith, setQueryHint, setQueryHints
addArgIfAbsent, annotations, annotationsEqual, argIterator, args, arity, clearProperty, copyAll, get, getProperty, indexOf, setArgs, setId, setProperty, setUnboundProperty, toArray, toArray
annotationsEqual, annotationsToString, annotationsToString, annotationValueToString, checkArgs, equals, getEvaluationContext, getId, getProperty, getRequiredProperty, hashCode, indent, isController, mutation, shortenName, toShortString
finalize, getClass, notify, notifyAll, wait, wait, wait
getContext, getParent, getParentGraphPatternGroup, getParentJoinGroup, setParent
toString
annotations, argIterator, args, arity, clone, get, getEvaluationContext, getId, getProperty, getRequiredProperty, isController, setProperty, toArray, toArray, toShortString, toString
getProperty
getAttachedJoinFilters, setAttachedJoinFilters
public UnionNode(UnionNode op)
com.bigdata.bop.BOpUtility#deepCopy(FilterNode)
.public UnionNode()
public UnionNode addChild(JoinGroupNode child)
IGroupNode
addChild
in interface IGroupNode<JoinGroupNode>
addChild
in class GroupNodeBase<JoinGroupNode>
public final boolean isOptional()
false
.isOptional
in interface IJoinNode
public long getEstimatedCardinality(StaticOptimizer optimizer)
IReorderableNode
getEstimatedCardinality
in interface IReorderableNode
optimizer
- This optimizer can be used to help work out the estimatepublic boolean isReorderable()
IReorderableNode
isReorderable
in interface IReorderableNode
public void addArg(BOp newArg)
GroupNodeBase
Overridden to set the parent reference on the child
addArg
in class GroupNodeBase<JoinGroupNode>
newArg
- The argument.public void addArg(int index, BOp newArg)
GroupNodeBase
Overridden to set the parent reference on the child
addArg
in class GroupNodeBase<JoinGroupNode>
index
- The index at which the child expression is to be inserted.newArg
- The argument.public int replaceWith(BOp oldChild, BOp newChild)
GroupNodeBase
Overridden to set the parent reference on the new child and clear the parent reference on the old child.
replaceWith
in class GroupNodeBase<JoinGroupNode>
public Set<IVariable<?>> getRequiredBound(StaticAnalysis sa)
IVariableBindingRequirements
IVariableBindingRequirements#getRequiredBound()
interface cannot be satisified, the query may still be valid and return
results (for the SPARQL 1.1 service example mentioned above, it may not,
for the FILTER it may).
The set of these variables must be disjoint from
IVariableBindingRequirements#getRequiredUnound()
.getRequiredBound
in interface IVariableBindingRequirements
public Set<IVariable<?>> getDesiredBound(StaticAnalysis sa)
IVariableBindingRequirements
IVariableBindingRequirements.getRequiredBound(StaticAnalysis)
.getDesiredBound
in interface IVariableBindingRequirements
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.