org.apache.pig.impl.logicalLayer
Class ExpressionOperator

java.lang.Object
  extended by org.apache.pig.impl.plan.Operator<LOVisitor>
      extended by org.apache.pig.impl.logicalLayer.LogicalOperator
          extended by org.apache.pig.impl.logicalLayer.ExpressionOperator
All Implemented Interfaces:
Serializable, Cloneable, Comparable<Operator>
Direct Known Subclasses:
BinaryExpressionOperator, LOBinCond, LOCast, LOConst, LOMapLookup, LOProject, LOUserFunc, UnaryExpressionOperator

public abstract class ExpressionOperator
extends LogicalOperator

See Also:
Serialized Form

Field Summary
protected  Schema.FieldSchema mFieldSchema
           
protected  boolean mIsFieldSchemaComputed
           
 
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
ExpressionOperator(LogicalPlan plan, OperatorKey k)
           
ExpressionOperator(LogicalPlan plan, OperatorKey k, int rp)
           
 
Method Summary
protected  Object clone()
           
 Schema.FieldSchema getFieldSchema()
           
 Schema getSchema()
          Get a copy of the schema for the output of this operator.
 byte getType()
          Get the type of this operator.
 Schema.FieldSchema regenerateFieldSchema()
           
 void setFieldSchema(Schema.FieldSchema fs)
          Set the output schema for this operator.
 boolean supportsMultipleOutputs()
          Indicates whether this operator supports multiple outputs.
 void unsetFieldSchema()
          Unset the field schema as if it had not been calculated.
 
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, toString, unsetSchema, visit
 
Methods inherited from class org.apache.pig.impl.plan.Operator
compareTo, equals, getProjectionMap, hashCode, name, regenerateProjectionMap, rewire, supportsMultipleInputs, unsetProjectionMap
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

mIsFieldSchemaComputed

protected boolean mIsFieldSchemaComputed

mFieldSchema

protected Schema.FieldSchema mFieldSchema
Constructor Detail

ExpressionOperator

public ExpressionOperator(LogicalPlan plan,
                          OperatorKey k,
                          int rp)
Parameters:
plan - Logical plan this operator is a part of.
k - Operator key to assign to this node.
rp - degree of requested parallelism with which to execute this node.

ExpressionOperator

public ExpressionOperator(LogicalPlan plan,
                          OperatorKey k)
Parameters:
plan - Logical plan this operator is a part of.
k - Operator key to assign to this node.
Method Detail

supportsMultipleOutputs

public boolean supportsMultipleOutputs()
Description copied from class: Operator
Indicates whether this operator supports multiple outputs.

Overrides:
supportsMultipleOutputs in class LogicalOperator
Returns:
true if it does, otherwise false.

getSchema

public Schema getSchema()
                 throws FrontendException
Description copied from class: LogicalOperator
Get a copy of the schema for the output of this operator.

Specified by:
getSchema in class LogicalOperator
Throws:
FrontendException

getFieldSchema

public Schema.FieldSchema getFieldSchema()
                                  throws FrontendException
Throws:
FrontendException

setFieldSchema

public void setFieldSchema(Schema.FieldSchema fs)
                    throws FrontendException
Set the output schema for this operator. If a schema already exists, an attempt will be made to reconcile it with this new schema.

Parameters:
fs - FieldSchema to set.
Throws:
FrontendException - if there is already a schema and the existing schema cannot be reconciled with this new schema.

unsetFieldSchema

public void unsetFieldSchema()
Unset the field schema as if it had not been calculated. This is used by anyone who reorganizes the tree and needs to have schemas recalculated.


regenerateFieldSchema

public Schema.FieldSchema regenerateFieldSchema()
                                         throws FrontendException
Throws:
FrontendException

getType

public byte getType()
Description copied from class: LogicalOperator
Get the type of this operator.

Overrides:
getType in class LogicalOperator

clone

protected Object clone()
                throws CloneNotSupportedException
Overrides:
clone in class LogicalOperator
Throws:
CloneNotSupportedException
See Also:
Do not use the clone method directly. Operators are cloned when logical plans are cloned using {@link LogicalPlanCloner}


Copyright © ${year} The Apache Software Foundation