org.apache.pig.experimental.logical.expression
Class LogicalExpression
java.lang.Object
org.apache.pig.experimental.plan.Operator
org.apache.pig.experimental.logical.expression.LogicalExpression
- Direct Known Subclasses:
- BinaryExpression, BinCondExpression, ColumnExpression, UnaryExpression, UserFuncExpression
public abstract class LogicalExpression
- extends Operator
Logical representation of expression operators. Expression operators have
a data type and a uid. Uid is a unique id for each expression.
Field Summary |
protected byte |
type
|
protected long |
uid
|
type
protected byte type
uid
protected long uid
LogicalExpression
public LogicalExpression(String name,
OperatorPlan plan,
byte b)
- Parameters:
name
- of the operatorplan
- LogicalExpressionPlan this is part ofb
- datatype of this expression
getNextUid
public static long getNextUid()
resetNextUid
public static void resetNextUid()
getType
public byte getType()
- Get the data type for this expression.
- Returns:
- data type, one of the static bytes of DataType
getUid
public long getUid()
- Get the unique identifier for this expression
- Returns:
- unique identifier
setUid
public void setUid(LogicalRelationalOperator currentOp)
throws IOException
- Set the uid. For most expressions this will get a new uid.
ProjectExpression needs to override this and find its uid from its
predecessor.
- Parameters:
currentOp
- Current LogicalRelationalOperator that this expression operator
is attached to. Passed so that projection operators can determine their uid.
- Throws:
IOException
neverUseForRealSetUid
public void neverUseForRealSetUid(long uid)
- Hard code the uid. This should only be used in testing, never in real
code.
- Parameters:
uid
- value to set uid to
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © ${year} The Apache Software Foundation