public abstract class LogicalRelationalOperator extends Operator
Modifier and Type | Field and Description |
---|---|
protected String |
alias |
protected int |
lineNum |
protected String |
mCustomPartitioner
Name of the customPartitioner if one is used, this is set to null otherwise.
|
protected HashSet<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(String name,
OperatorPlan plan) |
LogicalRelationalOperator(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(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.
|
String |
getAlias()
Get the alias of this operator.
|
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(Integer opt) |
void |
neverUseForRealSetSchema(LogicalSchema schema)
Only to be used by unit tests.
|
void |
pinOption(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(String alias) |
void |
setCustomPartitioner(String customPartitioner) |
void |
setRequestedParallelism(int parallel) |
void |
setSchema(LogicalSchema schema) |
String |
toString() |
accept, annotate, getAnnotation, getLocation, getName, getPlan, isEqual, removeAnnotation, setLocation, setPlan
protected LogicalSchema schema
protected int requestedParallelism
protected String alias
protected int lineNum
protected String mCustomPartitioner
public LogicalRelationalOperator(String name, OperatorPlan plan)
name
- of this operatorplan
- this operator is inpublic LogicalRelationalOperator(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 String getAlias()
public void setAlias(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 String getCustomPartitioner()
public void setCustomPartitioner(String customPartitioner)
public void pinOption(Integer opt)
public boolean isPinnedOption(Integer opt)
public static void fixDuplicateUids(List<LogicalSchema.LogicalFieldSchema> fss)
fss
- a list of LogicalFieldSchemas to check the uids ofCopyright © 2007-2012 The Apache Software Foundation