public abstract class LogicalRelationalOperator extends Operator
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
alias |
protected int |
lineNum |
protected java.lang.String |
mCustomPartitioner
Name of the customPartitioner if one is used, this is set to null otherwise.
|
protected java.util.HashSet<java.lang.Integer> |
mPinnedOptions
A HashSet to indicate whether an option (such a Join Type) was pinned
by the user or can be chosen at runtime by the optimizer.
|
protected int |
requestedParallelism |
protected LogicalSchema |
schema |
Constructor and Description |
---|
LogicalRelationalOperator(java.lang.String name,
OperatorPlan plan) |
LogicalRelationalOperator(java.lang.String name,
OperatorPlan plan,
int rp) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
checkEquality(LogicalRelationalOperator other)
Do some basic equality checks on two relational operators.
|
static void |
fixDuplicateUids(java.util.List<LogicalSchema.LogicalFieldSchema> fss)
In the case of an operation which manipualtes columns (such as a foreach or a join)
it is possible for multiple columns to have been derived from the same
column and thus have duplicate UID's.
|
java.lang.String |
getAlias()
Get the alias of this operator.
|
java.lang.String |
getCustomPartitioner() |
int |
getLineNumber()
Get the line number in the submitted Pig Latin script where this operator
occurred.
|
int |
getRequestedParallelism()
Get the requestedParallelism for this operator.
|
abstract LogicalSchema |
getSchema()
Get the schema for the output of this relational operator.
|
boolean |
isPinnedOption(java.lang.Integer opt) |
void |
neverUseForRealSetSchema(LogicalSchema schema)
Only to be used by unit tests.
|
void |
pinOption(java.lang.Integer opt) |
void |
resetSchema()
Reset the schema to null so that the next time getSchema is called
the schema will be regenerated from scratch.
|
void |
resetUid()
Erase all cached uid, regenerate uid when we regenerating schema.
|
void |
setAlias(java.lang.String alias) |
void |
setCustomPartitioner(java.lang.String customPartitioner) |
void |
setRequestedParallelism(int parallel) |
void |
setSchema(LogicalSchema schema) |
java.lang.String |
toString() |
accept, annotate, getAnnotation, getLocation, getName, getPlan, isEqual, removeAnnotation, setLocation, setPlan
protected LogicalSchema schema
protected int requestedParallelism
protected java.lang.String alias
protected int lineNum
protected java.lang.String mCustomPartitioner
protected java.util.HashSet<java.lang.Integer> mPinnedOptions
public LogicalRelationalOperator(java.lang.String name, OperatorPlan plan)
name
- of this operatorplan
- this operator is inpublic LogicalRelationalOperator(java.lang.String name, OperatorPlan plan, int rp)
name
- of this operatorplan
- this operator is inrp
- requested parallelismpublic abstract LogicalSchema getSchema() throws FrontendException
FrontendException
public void setSchema(LogicalSchema schema)
public void resetSchema()
public void resetUid()
public int getRequestedParallelism()
public java.lang.String getAlias()
public void setAlias(java.lang.String alias)
public void setRequestedParallelism(int parallel)
public int getLineNumber()
public void neverUseForRealSetSchema(LogicalSchema schema)
schema
- to setprotected boolean checkEquality(LogicalRelationalOperator other) throws FrontendException
other
- LogicalRelationalOperator to compare predecessors againstFrontendException
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getCustomPartitioner()
public void setCustomPartitioner(java.lang.String customPartitioner)
public void pinOption(java.lang.Integer opt)
public boolean isPinnedOption(java.lang.Integer opt)
public static void fixDuplicateUids(java.util.List<LogicalSchema.LogicalFieldSchema> fss)
fss
- a list of LogicalFieldSchemas to check the uids ofCopyright © 2007-2012 The Apache Software Foundation