return null;
}
ParseContext pctx = owc.getParseContext();
PrunedPartitionList prunedPartList;
try {
String alias = (String) owc.getParseContext().getTopOps().keySet().toArray()[0];
prunedPartList = pctx.getPrunedPartitions(alias, top);
} catch (HiveException e) {
// Has to use full name to make sure it does not conflict with
// org.apache.commons.lang.StringUtils
throw new SemanticException(e.getMessage(), e);
}
// Otherwise this is not a sampling predicate. We need to process it.
ExprNodeDesc predicate = fop.getConf().getPredicate();
String alias = top.getConf().getAlias();
ArrayList<Partition> partitions = new ArrayList<Partition>();
if (prunedPartList == null) {
return null;
}
for (Partition p : prunedPartList.getPartitions()) {
if (!p.getTable().isPartitioned()) {
return null;
}
}
partitions.addAll(prunedPartList.getPartitions());
PcrExprProcFactory.NodeInfoWrapper wrapper = PcrExprProcFactory.walkExprTree(
alias, partitions, top.getConf().getVirtualCols(), predicate);
if (wrapper.state == PcrExprProcFactory.WalkState.TRUE) {