|
||||||||||
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.LOSort
public class LOSort
Field Summary |
---|
Fields inherited from class org.apache.pig.impl.logicalLayer.LogicalOperator |
---|
mAlias, mCustomPartitioner, mIsProjectionMapComputed, mIsSchemaComputed, mPinnedOptions, mPlan, mProjectionMap, mRequestedParallelism, mSchema, mType |
Fields inherited from class org.apache.pig.impl.plan.Operator |
---|
mKey |
Constructor Summary | |
---|---|
LOSort(LogicalPlan plan,
OperatorKey key,
List<LogicalPlan> sortColPlans,
List<Boolean> ascCols,
FuncSpec sortFunc)
|
Method Summary | |
---|---|
protected Object |
clone()
|
List<Boolean> |
getAscendingCols()
|
LogicalOperator |
getInput()
|
long |
getLimit()
|
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. |
List<LogicalPlan> |
getSortColPlans()
|
SortInfo |
getSortInfo()
|
byte |
getType()
Get the type of this operator. |
FuncSpec |
getUserFunc()
|
boolean |
isLimited()
|
boolean |
isStar()
|
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 |
setAscendingCols(List<Boolean> ascCols)
|
void |
setLimit(long l)
|
void |
setSortColPlans(List<LogicalPlan> sortPlans)
|
void |
setStar(boolean b)
|
void |
setUserFunc(FuncSpec func)
|
boolean |
supportsMultipleInputs()
Indicates whether this operator supports multiple inputs. |
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, getAliasString, getCustomPartitioner, getOperatorKey, getPlan, getRequestedParallelism, isPinnedOption, pinOption, reconcileSchema, regenerateSchema, setAlias, setCanonicalNames, setCustomPartitioner, setParent, setPlan, setRequestedParallelism, setSchema, setSchemaComputed, setType, supportsMultipleOutputs, toString, unsetSchema |
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 |
Constructor Detail |
---|
public LOSort(LogicalPlan plan, OperatorKey key, List<LogicalPlan> sortColPlans, List<Boolean> ascCols, FuncSpec sortFunc)
plan
- LogicalPlan this operator is a part of.key
- OperatorKey for this operatorsortColPlans
- Array of column numbers that will be used for sorting data.ascCols
- Array of booleans. Should be same size as sortCols. True
indicates sort ascending (default), false sort descending. If
this array is null, then all columns will be sorted ascending.sortFunc
- the user defined sorting functionMethod Detail |
---|
public LogicalOperator getInput()
public List<LogicalPlan> getSortColPlans()
public void setSortColPlans(List<LogicalPlan> sortPlans)
public List<Boolean> getAscendingCols()
public void setAscendingCols(List<Boolean> ascCols)
public FuncSpec getUserFunc()
public void setUserFunc(FuncSpec func)
public boolean isStar()
public void setStar(boolean b)
public void setLimit(long l)
public long getLimit()
public boolean isLimited()
public String name()
name
in class Operator<LOVisitor>
public Schema getSchema() throws FrontendException
LogicalOperator
getSchema
in class LogicalOperator
FrontendException
public boolean supportsMultipleInputs()
Operator
supportsMultipleInputs
in class Operator<LOVisitor>
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 byte getType()
LogicalOperator
getType
in class LogicalOperator
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 SortInfo getSortInfo() throws FrontendException
FrontendException
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 |