org.apache.pig.impl.logicalLayer.schema
Class TupleSchema

java.lang.Object
  extended by org.apache.pig.impl.logicalLayer.schema.Schema
      extended by org.apache.pig.impl.logicalLayer.schema.TupleSchema
All Implemented Interfaces:
Serializable

public class TupleSchema
extends Schema
implements Serializable

A SchemaItemList encapuslates a group of schema items which may be SchemaFields (data atoms) or complex items, such as bags or tuples. A SchemaItemList will recursively search itself for the proper column number for a requested alias, matching against its own alias with priority.

Author:
dnm
See Also:
Serialized Form

Field Summary
 List<Schema> fields
           
 Map<String,Integer> mapping
           
 
Fields inherited from class org.apache.pig.impl.logicalLayer.schema.Schema
aliases
 
Constructor Summary
TupleSchema()
           
 
Method Summary
 void add(Schema sc)
           
 void add(Schema sc, boolean ignoreConflicts)
           
 int colFor(String alias)
           
 TupleSchema copy()
           
 List<Schema> flatten()
           
 List<Schema> getFields()
           
 boolean isBag()
           
 boolean isTuple()
           
 int numFields()
           
 Schema schemaFor(int col)
           
 String toString()
           
 
Methods inherited from class org.apache.pig.impl.logicalLayer.schema.Schema
getAlias, getAliases, removeAlias, removeAllAliases, setAlias
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fields

public List<Schema> fields

mapping

public Map<String,Integer> mapping
Constructor Detail

TupleSchema

public TupleSchema()
Method Detail

colFor

public int colFor(String alias)
Specified by:
colFor in class Schema

schemaFor

public Schema schemaFor(int col)
Specified by:
schemaFor in class Schema

add

public void add(Schema sc)

add

public void add(Schema sc,
                boolean ignoreConflicts)

numFields

public int numFields()

toString

public String toString()
Overrides:
toString in class Object

copy

public TupleSchema copy()
Overrides:
copy in class Schema

flatten

public List<Schema> flatten()
Specified by:
flatten in class Schema

getFields

public List<Schema> getFields()

isBag

public boolean isBag()

isTuple

public boolean isTuple()


Copyright © ${year} The Apache Software Foundation