org.apache.pig.newplan
Class FilterExtractor
java.lang.Object
org.apache.pig.newplan.FilterExtractor
public class FilterExtractor
- extends Object
This is a rewrite of PColFilterExtractor
We traverse the expression plan bottom up and separate it into two plans
- pushdownExprPlan, plan that can be pushed down to the loader and
- filterExprPlan, remaining plan that needs to be evaluated by pig
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
originalPlan
protected LogicalExpressionPlan originalPlan
- We visit this plan to create the filteredPlan
filteredPlan
protected LogicalExpressionPlan filteredPlan
- Plan that is created after all pushable filters are removed
pushdownExprPlan
protected LogicalExpressionPlan pushdownExprPlan
- Plan that can be pushed down
FilterExtractor
public FilterExtractor(LogicalExpressionPlan plan,
List<String> partitionCols)
- Parameters:
plan
- logical plan corresponding the filter's comparison conditionpartitionCols
- list of partition columns of the table which is
being loaded in the LOAD statement which is input to the filter
visit
public void visit()
throws FrontendException
- Throws:
FrontendException
getFilteredPlan
public LogicalExpressionPlan getFilteredPlan()
- Returns:
- new filtered plan after pushdownable filters are removed
canPushDown
public boolean canPushDown()
- Returns:
- true if pushdown is possible
isFilterRemovable
public boolean isFilterRemovable()
- Returns:
- the filterRemovable
getPColCondition
public Expression getPColCondition()
- Returns:
- the condition on partition columns extracted from filter
getExpression
public static Expression getExpression(LogicalExpression op)
throws FrontendException
- Throws:
FrontendException
Copyright © 2007-2012 The Apache Software Foundation