public abstract class FilterExtractor extends Object
LoadPredicatePushdown
Modifier and Type | Class and Description |
---|---|
protected class |
FilterExtractor.KeyState |
Modifier and Type | Field and Description |
---|---|
protected LogicalExpressionPlan |
filteredPlan
Plan that is created after all pushable filters are removed
|
protected LogicalExpression |
filterExpr
Final filterExpr after we are done
|
protected org.apache.commons.logging.Log |
LOG |
protected LogicalExpressionPlan |
originalPlan
We visit this plan to create the filteredPlan
|
protected Expression |
pushdownExpr |
protected LogicalExpressionPlan |
pushdownExprPlan
Plan that can be pushed down
|
Constructor and Description |
---|
FilterExtractor(LogicalExpressionPlan plan) |
Modifier and Type | Method and Description |
---|---|
protected LogicalExpression |
addToFilterPlan(LogicalExpression op) |
boolean |
canPushDown() |
protected FilterExtractor.KeyState |
checkPushDown(BinaryExpression binExpr) |
protected FilterExtractor.KeyState |
checkPushDown(LogicalExpression op) |
protected abstract FilterExtractor.KeyState |
checkPushDown(ProjectExpression project) |
protected FilterExtractor.KeyState |
checkPushDown(UnaryExpression unaryExpr) |
protected Expression |
getExpression(BinaryExpression binOp,
Expression.OpType opType) |
Expression |
getExpression(LogicalExpression op) |
protected Expression |
getExpression(UnaryExpression unaryOp,
Expression.OpType opType) |
LogicalExpressionPlan |
getFilteredPlan() |
Expression |
getPushDownExpression() |
boolean |
isFilterRemovable() |
protected abstract boolean |
isSupportedOpType(BinaryExpression binOp) |
protected abstract boolean |
isSupportedOpType(UnaryExpression unaryOp) |
void |
visit() |
protected final org.apache.commons.logging.Log LOG
protected LogicalExpressionPlan originalPlan
protected LogicalExpressionPlan filteredPlan
protected LogicalExpressionPlan pushdownExprPlan
protected LogicalExpression filterExpr
protected Expression pushdownExpr
public FilterExtractor(LogicalExpressionPlan plan)
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 filterpublic void visit() throws FrontendException
FrontendException
public LogicalExpressionPlan getFilteredPlan()
public boolean canPushDown()
public boolean isFilterRemovable()
public Expression getPushDownExpression()
protected FilterExtractor.KeyState checkPushDown(LogicalExpression op) throws FrontendException
FrontendException
protected LogicalExpression addToFilterPlan(LogicalExpression op) throws FrontendException
FrontendException
protected FilterExtractor.KeyState checkPushDown(BinaryExpression binExpr) throws FrontendException
FrontendException
protected FilterExtractor.KeyState checkPushDown(UnaryExpression unaryExpr) throws FrontendException
FrontendException
protected abstract FilterExtractor.KeyState checkPushDown(ProjectExpression project) throws FrontendException
FrontendException
protected abstract boolean isSupportedOpType(BinaryExpression binOp)
protected abstract boolean isSupportedOpType(UnaryExpression unaryOp)
public Expression getExpression(LogicalExpression op) throws FrontendException
FrontendException
protected Expression getExpression(BinaryExpression binOp, Expression.OpType opType) throws FrontendException
FrontendException
protected Expression getExpression(UnaryExpression unaryOp, Expression.OpType opType) throws FrontendException
FrontendException
Copyright © 2007-2017 The Apache Software Foundation