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

java.lang.Object
  extended by org.apache.pig.newplan.optimizer.Rule
      extended by org.apache.pig.newplan.logical.rules.TypeCastInserter
          extended by org.apache.pig.newplan.logical.rules.LoadTypeCastInserter

public class LoadTypeCastInserter
extends TypeCastInserter


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.pig.newplan.logical.rules.TypeCastInserter
TypeCastInserter.TypeCastInserterTransformer
 
Field Summary
 
Fields inherited from class org.apache.pig.newplan.optimizer.Rule
currentPlan, log, name, pattern
 
Constructor Summary
LoadTypeCastInserter(String n)
           
 
Method Summary
protected  OperatorPlan buildPattern()
          Build the pattern that this rule will look for
protected  LogicalSchema determineSchema(LogicalRelationalOperator op)
          if we are inserting casts in a load and if the loader implements determineSchema(), insert casts only where necessary Note that in this case, the data coming out of the loader is not a BYTEARRAY but is whatever determineSchema() says it is.
protected  boolean isCastAdjusted(LogicalRelationalOperator op)
           
protected  void markCastInserted(LogicalRelationalOperator op)
           
protected  void markCastNoNeed(LogicalRelationalOperator op)
           
 
Methods inherited from class org.apache.pig.newplan.logical.rules.TypeCastInserter
getNewTransformer
 
Methods inherited from class org.apache.pig.newplan.optimizer.Rule
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

LoadTypeCastInserter

public LoadTypeCastInserter(String n)
Method Detail

buildPattern

protected OperatorPlan buildPattern()
Description copied from class: Rule
Build the pattern that this rule will look for

Specified by:
buildPattern in class Rule
Returns:
the pattern to look for by this rule

determineSchema

protected LogicalSchema determineSchema(LogicalRelationalOperator op)
                                 throws FrontendException
if we are inserting casts in a load and if the loader implements determineSchema(), insert casts only where necessary Note that in this case, the data coming out of the loader is not a BYTEARRAY but is whatever determineSchema() says it is.

Specified by:
determineSchema in class TypeCastInserter
Throws:
FrontendException

markCastInserted

protected void markCastInserted(LogicalRelationalOperator op)
Specified by:
markCastInserted in class TypeCastInserter

markCastNoNeed

protected void markCastNoNeed(LogicalRelationalOperator op)
Specified by:
markCastNoNeed in class TypeCastInserter

isCastAdjusted

protected boolean isCastAdjusted(LogicalRelationalOperator op)
Specified by:
isCastAdjusted in class TypeCastInserter


Copyright © 2007-2012 The Apache Software Foundation