org.apache.pig.newplan.logical
Class Util

java.lang.Object
  extended by org.apache.pig.newplan.logical.Util

public class Util
extends Object


Constructor Summary
Util()
           
 
Method Summary
static LOForEach addForEachAfter(LogicalPlan plan, LogicalRelationalOperator op, int branch, Set<Integer> columnsToDrop)
           
static Schema fixSchemaAddTupleInBag(Schema sch)
          If schema argument has fields where a bag does not contain a tuple schema, it inserts a tuple schema.
static Schema.FieldSchema translateFieldSchema(LogicalSchema.LogicalFieldSchema fs)
           
static LogicalSchema.LogicalFieldSchema translateFieldSchema(Schema.FieldSchema fs)
           
static Schema translateSchema(LogicalSchema schema)
          This function translates the new LogicalSchema into old Schema format required by PhysicalOperators
static LogicalSchema translateSchema(Schema schema)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

public Util()
Method Detail

translateSchema

public static LogicalSchema translateSchema(Schema schema)

translateFieldSchema

public static LogicalSchema.LogicalFieldSchema translateFieldSchema(Schema.FieldSchema fs)

translateSchema

public static Schema translateSchema(LogicalSchema schema)
This function translates the new LogicalSchema into old Schema format required by PhysicalOperators

Parameters:
schema - LogicalSchema to be converted to Schema
Returns:
Schema that is converted from LogicalSchema
Throws:
FrontendException

fixSchemaAddTupleInBag

public static Schema fixSchemaAddTupleInBag(Schema sch)
                                     throws FrontendException
If schema argument has fields where a bag does not contain a tuple schema, it inserts a tuple schema. It does so for all inner levels. eg bag({int}) => bag({(int)})

Parameters:
sch -
Returns:
modified schema
Throws:
FrontendException

translateFieldSchema

public static Schema.FieldSchema translateFieldSchema(LogicalSchema.LogicalFieldSchema fs)

addForEachAfter

public static LOForEach addForEachAfter(LogicalPlan plan,
                                        LogicalRelationalOperator op,
                                        int branch,
                                        Set<Integer> columnsToDrop)
                                 throws FrontendException
Throws:
FrontendException


Copyright © ${year} The Apache Software Foundation