//// helper methods ///////
private PColFilterExtractor test(LogicalPlan lp, List<String> partitionCols,
String expPartFilterString, String expFilterString)
throws FrontendException {
LOFilter filter = (LOFilter)lp.getLeaves().get(0);
PColFilterExtractor pColExtractor = new PColFilterExtractor(
filter.getComparisonPlan(), partitionCols);
pColExtractor.visit();
if(expPartFilterString == null) {
assertEquals("Checking partition column filter:", null,
pColExtractor.getPColCondition());
} else {
assertEquals("Checking partition column filter:",
expPartFilterString.toLowerCase(),
pColExtractor.getPColCondition().toString().toLowerCase());
}
if(expFilterString == null) {
assertTrue("Check that filter can be removed:",
pColExtractor.isFilterRemovable());
} else {
String actual = PColFilterExtractor.getExpression(
(ExpressionOperator) filter.getComparisonPlan().
getLeaves().get(0)).
toString().toLowerCase();
assertEquals("checking trimmed filter expression:", expFilterString,
actual);
}