public abstract class Operator<V extends PlanVisitor> extends java.lang.Object implements java.io.Serializable, java.lang.Comparable<Operator>, java.lang.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 java.lang.Object |
clone() |
int |
compareTo(Operator o) |
boolean |
equals(java.lang.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 java.lang.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.
|
java.lang.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 java.lang.String name()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public int compareTo(Operator o)
compareTo
in interface java.lang.Comparable<Operator>
protected java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
Do 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 mapPlanException
Copyright © 2007-2017 The Apache Software Foundation