org.apache.pig.newplan.logical.expression
Class BinCondExpression

java.lang.Object
  extended by org.apache.pig.newplan.Operator
      extended by org.apache.pig.newplan.logical.expression.LogicalExpression
          extended by org.apache.pig.newplan.logical.expression.BinCondExpression

public class BinCondExpression
extends LogicalExpression


Field Summary
 
Fields inherited from class org.apache.pig.newplan.logical.expression.LogicalExpression
fieldSchema, uidOnlyFieldSchema
 
Fields inherited from class org.apache.pig.newplan.Operator
annotations, hashPrime, name, plan
 
Constructor Summary
BinCondExpression(OperatorPlan plan, LogicalExpression condition, LogicalExpression lhs, LogicalExpression rhs)
          Will add this operator to the plan and connect it to the left and right hand side operators and the condition operator
 
Method Summary
 void accept(PlanVisitor v)
          Accept a visitor at this node in the graph.
 LogicalExpression deepCopy(LogicalExpressionPlan lgExpPlan)
          Create the deep copy of this expression and add that into the passed LogicalExpressionPlan Return the copy of this expression with updated logical expression plan.
 LogicalExpression getCondition()
          Returns the operator which handles this condition
 LogicalSchema.LogicalFieldSchema getFieldSchema()
          Get the field schema for the output of this expression operator.
 LogicalExpression getLhs()
          Get the left hand side of this expression.
 LogicalExpression getRhs()
          Get the right hand side of this expression.
 boolean isEqual(Operator other)
          This is like a shallow equals comparison.
 
Methods inherited from class org.apache.pig.newplan.logical.expression.LogicalExpression
getNextUid, getType, neverUseForRealSetFieldSchema, resetFieldSchema, resetNextUid, resetUid, toString
 
Methods inherited from class org.apache.pig.newplan.Operator
annotate, getAnnotation, getName, getPlan, removeAnnotation, setPlan
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BinCondExpression

public BinCondExpression(OperatorPlan plan,
                         LogicalExpression condition,
                         LogicalExpression lhs,
                         LogicalExpression rhs)
Will add this operator to the plan and connect it to the left and right hand side operators and the condition operator

Parameters:
plan - plan this operator is part of
lhs - expression on its left hand side
rhs - expression on its right hand side
Method Detail

getCondition

public LogicalExpression getCondition()
                               throws FrontendException
Returns the operator which handles this condition

Returns:
expression which handles the condition
Throws:
FrontendException

getLhs

public LogicalExpression getLhs()
                         throws FrontendException
Get the left hand side of this expression.

Returns:
expression on the left hand side
Throws:
FrontendException

getRhs

public LogicalExpression getRhs()
                         throws FrontendException
Get the right hand side of this expression.

Returns:
expression on the right hand side
Throws:
FrontendException

accept

public void accept(PlanVisitor v)
            throws FrontendException
Description copied from class: Operator
Accept a visitor at this node in the graph.

Specified by:
accept in class Operator
Parameters:
v - Visitor to accept.
Throws:
FrontendException

isEqual

public boolean isEqual(Operator other)
                throws FrontendException
Description copied from class: Operator
This is like a shallow equals comparison. It returns true if two operators have equivalent properties even if they are different objects. Here properties mean equivalent plan and equivalent name.

Specified by:
isEqual in class Operator
Returns:
true if two object have equivalent properties, else false
Throws:
FrontendException

getFieldSchema

public LogicalSchema.LogicalFieldSchema getFieldSchema()
                                                throws FrontendException
Description copied from class: LogicalExpression
Get the field schema for the output of this expression operator. This does not merely return the field schema variable. If schema is not yet set, this will attempt to construct it. Therefore it is abstract since each operator will need to construct its field schema differently.

Specified by:
getFieldSchema in class LogicalExpression
Returns:
the FieldSchema
Throws:
FrontendException

deepCopy

public LogicalExpression deepCopy(LogicalExpressionPlan lgExpPlan)
                           throws FrontendException
Description copied from class: LogicalExpression
Create the deep copy of this expression and add that into the passed LogicalExpressionPlan Return the copy of this expression with updated logical expression plan.

Specified by:
deepCopy in class LogicalExpression
Parameters:
lgExpPlan - LogicalExpressionPlan in which this expression will be added.
Returns:
LogicalExpression with its own logical expression plan.
Throws:
FrontendException


Copyright © ${year} The Apache Software Foundation