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

java.lang.Object
  extended by org.apache.pig.newplan.logical.rules.OptimizerUtils

public class OptimizerUtils
extends Object


Constructor Summary
OptimizerUtils()
           
 
Method Summary
static LOGenerate findGenerate(LOForEach foreach)
          Find generate op from the foreach operator.
static boolean hasFlatten(LOForEach foreach)
          Helper method to find if a given LOForEach instance contains any flatten fields.
static boolean hasFlatten(LOGenerate gen)
          Check if a given LOGenerate operator has any flatten fields.
static boolean planHasNonDeterministicUdf(LogicalExpressionPlan filterPlan)
          Helper method to determine if the logical expression plan for a Filter contains non-deterministic operations and should therefore be treated extra carefully during optimization.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OptimizerUtils

public OptimizerUtils()
Method Detail

findGenerate

public static LOGenerate findGenerate(LOForEach foreach)
Find generate op from the foreach operator.

Parameters:
foreach - the LOForEach instance
Returns:
LOGenerate instance

hasFlatten

public static boolean hasFlatten(LOGenerate gen)
Check if a given LOGenerate operator has any flatten fields.

Parameters:
gen - the given LOGenerate instance
Returns:
true if LOGenerate instance contains flatten fields, false otherwise

hasFlatten

public static boolean hasFlatten(LOForEach foreach)
Helper method to find if a given LOForEach instance contains any flatten fields.

Parameters:
foreach - foreach the LOForEach instance
Returns:
true if LOForEach instance contains flatten fields, false otherwise

planHasNonDeterministicUdf

public static boolean planHasNonDeterministicUdf(LogicalExpressionPlan filterPlan)
                                          throws FrontendException
Helper method to determine if the logical expression plan for a Filter contains non-deterministic operations and should therefore be treated extra carefully during optimization.

Parameters:
filterPlan -
Returns:
true of the filter plan contains a non-deterministic UDF
Throws:
FrontendException


Copyright © 2007-2012 The Apache Software Foundation