org.apache.pig.newplan.logical.rules
Class TypeCastInserter

java.lang.Object
  extended by org.apache.pig.newplan.optimizer.Rule
      extended by org.apache.pig.newplan.logical.rules.TypeCastInserter
Direct Known Subclasses:
LoadTypeCastInserter, StreamTypeCastInserter

public abstract class TypeCastInserter
extends Rule


Nested Class Summary
 class TypeCastInserter.TypeCastInserterTransformer
           
 
Field Summary
 
Fields inherited from class org.apache.pig.newplan.optimizer.Rule
currentPlan, log, name, pattern
 
Constructor Summary
TypeCastInserter(String n)
           
 
Method Summary
protected abstract  LogicalSchema determineSchema(LogicalRelationalOperator op)
           
 Transformer getNewTransformer()
          Get the transformer for this rule.
protected abstract  boolean isCastAdjusted(LogicalRelationalOperator op)
           
protected abstract  void markCastInserted(LogicalRelationalOperator op)
           
protected abstract  void markCastNoNeed(LogicalRelationalOperator op)
           
 
Methods inherited from class org.apache.pig.newplan.optimizer.Rule
buildPattern, getName, getPattern, isMandatory, isSkipListener, match, setSkipListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeCastInserter

public TypeCastInserter(String n)
Method Detail

determineSchema

protected abstract LogicalSchema determineSchema(LogicalRelationalOperator op)
                                          throws FrontendException
Throws:
FrontendException

getNewTransformer

public Transformer getNewTransformer()
Description copied from class: Rule
Get the transformer for this rule. Abstract because the rule may want to choose how to instantiate the transformer. This should never return a cached transformer, it should always return a fresh one with no state.

Specified by:
getNewTransformer in class Rule
Returns:
Transformer to use with this rule

markCastInserted

protected abstract void markCastInserted(LogicalRelationalOperator op)

markCastNoNeed

protected abstract void markCastNoNeed(LogicalRelationalOperator op)

isCastAdjusted

protected abstract boolean isCastAdjusted(LogicalRelationalOperator op)


Copyright © 2007-2012 The Apache Software Foundation