public abstract class Operator<V extends PlanVisitor> extends Object implements Serializable, Comparable<Operator>, Cloneable
| Modifier and Type | Field and Description |
|---|---|
protected OperatorKey |
mKey
OperatorKey associated with this operator.
|
| Constructor and Description |
|---|
Operator(OperatorKey k) |
| Modifier and Type | Method and Description |
|---|---|
protected Object |
clone() |
int |
compareTo(Operator o) |
boolean |
equals(Object obj)
Compares to Operators based on their opKey
|
OperatorKey |
getOperatorKey()
Get the operator key for this operator.
|
ProjectionMap |
getProjectionMap()
Produce a map describing how this operator modifies its projection.
|
int |
hashCode()
Needed to ensure that the list iterators'
outputs are deterministic.
|
abstract String |
name() |
ProjectionMap |
regenerateProjectionMap()
Regenerate the projection map by unsetting and getting the projection map
|
void |
rewire(Operator<V> oldPred,
int oldPredIndex,
Operator<V> newPred,
boolean useOldPred)
Make any necessary changes to a node based on a change of position in the
plan.
|
abstract boolean |
supportsMultipleInputs()
Indicates whether this operator supports multiple inputs.
|
abstract boolean |
supportsMultipleOutputs()
Indicates whether this operator supports multiple outputs.
|
String |
toString() |
void |
unsetProjectionMap()
Unset the projection map as if it had not been calculated.
|
abstract void |
visit(V v)
Visit this node with the provided visitor.
|
protected OperatorKey mKey
public Operator(OperatorKey k)
k - Operator key to assign to this node.public OperatorKey getOperatorKey()
public abstract void visit(V v) throws VisitorException
v - Visitor to visit with.VisitorException - if the visitor has a problem.public abstract boolean supportsMultipleInputs()
public abstract boolean supportsMultipleOutputs()
public abstract String name()
public boolean equals(Object obj)
public int hashCode()
public int compareTo(Operator o)
compareTo in interface Comparable<Operator>protected Object clone() throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionDo not use the clone method directly. Operators are cloned when logical plans
are cloned using {@link LogicalPlanCloner}public ProjectionMap getProjectionMap()
public void unsetProjectionMap()
public ProjectionMap regenerateProjectionMap()
public void rewire(Operator<V> oldPred, int oldPredIndex, Operator<V> newPred, boolean useOldPred) throws PlanException
oldPred - Operator that was previously the predecessor.oldPredIndex - position of the old predecessor in the list of predecessorsnewPred - Operator that will now be the predecessor.useOldPred - If true use oldPred's projection map for the rewire; otherwise
use newPred's projection mapPlanExceptionCopyright © 2007-2017 The Apache Software Foundation