|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pig.impl.plan.Operator<LOVisitor>
org.apache.pig.impl.logicalLayer.LogicalOperator
org.apache.pig.impl.logicalLayer.RelationalOperator
org.apache.pig.impl.logicalLayer.LOCogroup
public class LOCogroup
Nested Class Summary | |
---|---|
static class |
LOCogroup.GROUPTYPE
Enum for the type of group |
Field Summary | |
---|---|
static Integer |
OPTION_GROUPTYPE
static constant to refer to the option of selecting a group type |
Fields inherited from class org.apache.pig.impl.logicalLayer.LogicalOperator |
---|
mAlias, mIsProjectionMapComputed, mIsSchemaComputed, mPinnedOptions, mPlan, mProjectionMap, mRequestedParallelism, mSchema, mType |
Fields inherited from class org.apache.pig.impl.plan.Operator |
---|
mKey |
Constructor Summary | |
---|---|
LOCogroup(LogicalPlan plan,
OperatorKey k,
MultiMap<LogicalOperator,LogicalPlan> groupByPlans,
boolean[] isInner)
|
|
LOCogroup(LogicalPlan plan,
OperatorKey k,
MultiMap<LogicalOperator,LogicalPlan> groupByPlans,
LOCogroup.GROUPTYPE type,
boolean[] isInner)
|
Method Summary | |
---|---|
protected Object |
clone()
|
byte |
getAtomicGroupByType()
This can be used to get the merged type of output group col only when the group col is of atomic type TODO: This doesn't work with group by complex type |
MultiMap<LogicalOperator,LogicalPlan> |
getGroupByPlans()
|
LOCogroup.GROUPTYPE |
getGroupType()
|
boolean[] |
getInner()
|
List<LogicalOperator> |
getInputs()
|
ProjectionMap |
getProjectionMap()
Produce a map describing how this operator modifies its projection. |
List<RequiredFields> |
getRelevantInputs(int output,
int column)
Get relevant input columns of a particular output column. |
List<RequiredFields> |
getRequiredFields()
Get a list of fields that this operator requires. |
Schema |
getSchema()
Get a copy of the schema for the output of this operator. |
Schema |
getTupleGroupBySchema()
|
boolean |
isTupleGroupCol()
|
String |
name()
|
boolean |
pruneColumns(List<Pair<Integer,Integer>> columns)
|
void |
rewire(Operator<LOVisitor> oldPred,
int oldPredIndex,
Operator<LOVisitor> newPred,
boolean useOldPred)
Make any necessary changes to a node based on a change of position in the plan. |
void |
setGroupByPlans(MultiMap<LogicalOperator,LogicalPlan> groupByPlans)
|
void |
setInner(boolean[] inner)
|
boolean |
supportsMultipleInputs()
Indicates whether this operator supports multiple inputs. |
void |
switchGroupByPlanOp(LogicalOperator oldOp,
LogicalOperator newOp)
This does switch the mapping oldOp -> List of inner plans to newOp -> List of inner plans which is useful when there is a structural change in LogicalPlan |
void |
unsetSchema()
Unset the schema as if it had not been calculated. |
void |
visit(LOVisitor v)
Visit this node with the provided visitor. |
Methods inherited from class org.apache.pig.impl.logicalLayer.RelationalOperator |
---|
insertPlainForEachAfter, pruneColumnInPlan, regenerateProjectionMap, unsetProjectionMap |
Methods inherited from class org.apache.pig.impl.logicalLayer.LogicalOperator |
---|
forceSchema, getAlias, getOperatorKey, getPlan, getRequestedParallelism, getType, isPinnedOption, pinOption, reconcileSchema, regenerateSchema, setAlias, setCanonicalNames, setPlan, setRequestedParallelism, setSchema, setSchemaComputed, setType, supportsMultipleOutputs, toString |
Methods inherited from class org.apache.pig.impl.plan.Operator |
---|
compareTo, equals, hashCode |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Integer OPTION_GROUPTYPE
Constructor Detail |
---|
public LOCogroup(LogicalPlan plan, OperatorKey k, MultiMap<LogicalOperator,LogicalPlan> groupByPlans, boolean[] isInner)
plan
- LogicalPlan this operator is a part of.k
- OperatorKey for this operatorgroupByPlans
- the group by columnsisInner
- indicates whether the cogroup is inner for each relationpublic LOCogroup(LogicalPlan plan, OperatorKey k, MultiMap<LogicalOperator,LogicalPlan> groupByPlans, LOCogroup.GROUPTYPE type, boolean[] isInner)
plan
- LogicalPlan this operator is a part of.k
- OperatorKey for this operatorgroupByPlans
- the group by columnstype
- the type of this groupisInner
- indicates whether the cogroup is inner for each relationMethod Detail |
---|
public List<LogicalOperator> getInputs()
public MultiMap<LogicalOperator,LogicalPlan> getGroupByPlans()
public void setGroupByPlans(MultiMap<LogicalOperator,LogicalPlan> groupByPlans)
public boolean[] getInner()
public void setInner(boolean[] inner)
public LOCogroup.GROUPTYPE getGroupType()
public String name()
name
in class Operator<LOVisitor>
public boolean supportsMultipleInputs()
Operator
supportsMultipleInputs
in class Operator<LOVisitor>
public Schema getSchema() throws FrontendException
LogicalOperator
getSchema
in class LogicalOperator
FrontendException
public boolean isTupleGroupCol()
public void visit(LOVisitor v) throws VisitorException
LogicalOperator
visit
in class LogicalOperator
v
- Visitor to visit with.
VisitorException
- if the visitor has a problem.public void switchGroupByPlanOp(LogicalOperator oldOp, LogicalOperator newOp)
oldOp
- the old operatornewOp
- the new operatorpublic void unsetSchema() throws VisitorException
LogicalOperator
unsetSchema
in class LogicalOperator
VisitorException
public byte getAtomicGroupByType() throws FrontendException
FrontendException
public Schema getTupleGroupBySchema() throws FrontendException
FrontendException
protected Object clone() throws CloneNotSupportedException
clone
in class LogicalOperator
CloneNotSupportedException
Do not use the clone method directly. Operators are cloned when logical plans
are cloned using {@link LogicalPlanCloner}
public ProjectionMap getProjectionMap()
RelationalOperator
getProjectionMap
in class RelationalOperator
public List<RequiredFields> getRequiredFields()
RelationalOperator
getRequiredFields
in class RelationalOperator
public void rewire(Operator<LOVisitor> oldPred, int oldPredIndex, Operator<LOVisitor> newPred, boolean useOldPred) throws PlanException
Operator
rewire
in class Operator<LOVisitor>
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 map
PlanException
public List<RequiredFields> getRelevantInputs(int output, int column) throws FrontendException
RelationalOperator
getRelevantInputs
in class RelationalOperator
output
- output index. Only LOSplit have output other than 0 currentlycolumn
- output column
FrontendException
public boolean pruneColumns(List<Pair<Integer,Integer>> columns) throws FrontendException
pruneColumns
in class RelationalOperator
FrontendException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |