org.apache.pig.newplan
Class PColFilterExtractor
java.lang.Object
org.apache.pig.newplan.PlanVisitor
org.apache.pig.newplan.PColFilterExtractor
public class PColFilterExtractor
- extends PlanVisitor
This Visitor works on the filter condition of a LOFilter which immediately
follows a LOLoad that interacts with a metadata system (currently OWL) to
read table data. The visitor looks for conditions on partition columns in the
filter condition and extracts those conditions out of the filter condition.
The condition on partition cols will be used to prune partitions of the table.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PColFilterExtractor
public PColFilterExtractor(OperatorPlan 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
- Description copied from class:
PlanVisitor
- Entry point for visiting the plan.
- Overrides:
visit
in class PlanVisitor
- Throws:
VisitorException
- if an error is encountered while visiting.
FrontendException
visit
protected void visit(ProjectExpression project)
throws FrontendException
- Throws:
FrontendException
getPColCondition
public Expression getPColCondition()
- Returns:
- the condition on partition columns extracted from filter
isFilterRemovable
public boolean isFilterRemovable()
- Returns:
- the filterRemovable
getExpression
public Expression getExpression(LogicalExpression op)
throws FrontendException
- Throws:
FrontendException
canPushDown
public boolean canPushDown()
Copyright © 2007-2012 The Apache Software Foundation