org.apache.pig.impl.plan
Class ProjectionMap

java.lang.Object
  extended by org.apache.pig.impl.plan.ProjectionMap

public class ProjectionMap
extends Object

A struct detailing how a projection is altered by an operator.


Nested Class Summary
static class ProjectionMap.Column
          A wrapper for projection map columns to contain the input number, input column.
 
Constructor Summary
ProjectionMap(boolean changes)
           
ProjectionMap(MultiMap<Integer,ProjectionMap.Column> mapFields, List<Pair<Integer,Integer>> removedFields, List<Integer> addedFields)
           
 
Method Summary
 boolean changes()
           
 List<Integer> getAddedFields()
           
 boolean getChanges()
           
 MultiMap<Integer,ProjectionMap.Column> getMappedFields()
           
 List<Pair<Integer,Integer>> getRemovedFields()
           
 void setAddedFields(List<Integer> fields)
           
 void setChanges(boolean changes)
           
 void setMappedFields(MultiMap<Integer,ProjectionMap.Column> fields)
           
 void setRemovedFields(List<Pair<Integer,Integer>> fields)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProjectionMap

public ProjectionMap(boolean changes)
Parameters:
changes - to indicate if this projection map changes its input or not

ProjectionMap

public ProjectionMap(MultiMap<Integer,ProjectionMap.Column> mapFields,
                     List<Pair<Integer,Integer>> removedFields,
                     List<Integer> addedFields)
Parameters:
mapFields - the mapping of input column to output column
removedFields - the list of input columns that are removed
addedFields - the list of columns that are added to the output
Method Detail

getMappedFields

public MultiMap<Integer,ProjectionMap.Column> getMappedFields()
Returns:
the mapping of input column to output column

setMappedFields

public void setMappedFields(MultiMap<Integer,ProjectionMap.Column> fields)
Parameters:
fields - the mapping of input column to output column

getRemovedFields

public List<Pair<Integer,Integer>> getRemovedFields()
Returns:
the list of input columns that are removed

setRemovedFields

public void setRemovedFields(List<Pair<Integer,Integer>> fields)
Parameters:
fields - the list of input columns that are removed

getAddedFields

public List<Integer> getAddedFields()
Returns:
the list of columns that are added to the output

setAddedFields

public void setAddedFields(List<Integer> fields)
Parameters:
fields - the list of columns that are added to the output

changes

public boolean changes()
Returns:
if this projection map changes its input or not

getChanges

public boolean getChanges()
Returns:
if this projection map changes its input or not

setChanges

public void setChanges(boolean changes)
Parameters:
changes - if this projection map changes its input or not

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2007-2012 The Apache Software Foundation