protected static Object createFilter(Operator op, ExprWalkerInfo pushDownPreds, OpWalkerInfo owi) throws SemanticException { if (pushDownPreds != null && pushDownPreds.hasAnyCandidates()) { return createFilter(op, pushDownPreds.getFinalCandidates(), owi); } return null; }
@Override public Object process(Node nd, Stack<Node> stack, NodeProcessorCtx procCtx, Object... nodeOutputs) throws SemanticException { ExprWalkerInfo ctx = (ExprWalkerInfo) procCtx; ExprInfo exprInfo = ctx.addOrGetExprInfo((ExprNodeDesc) nd); exprInfo.isCandidate = true; return true; } }
@Override public Object process(Node nd, Stack<Node> stack, NodeProcessorCtx procCtx, Object... nodeOutputs) throws SemanticException { return process(nd, stack, procCtx, false, nodeOutputs); }
@Override public Object process(Node nd, Stack<Node> stack, NodeProcessorCtx procCtx, Object... nodeOutputs) throws SemanticException { super.process(nd, stack, procCtx, nodeOutputs); OpWalkerInfo owi = (OpWalkerInfo) procCtx; ExprWalkerInfo prunedPred = owi.getPrunedPreds((Operator<? extends OperatorDesc>) nd); if (prunedPred == null || !prunedPred.hasAnyCandidates()) { return null; } Map<String, List<ExprNodeDesc>> candidates = prunedPred.getFinalCandidates(); createFilter((Operator)nd, prunedPred, owi); candidates.clear(); return null; }
protected Object handlePredicates(Node nd, ExprWalkerInfo prunePreds, OpWalkerInfo owi) throws SemanticException { if (HiveConf.getBoolVar(owi.getParseContext().getConf(), HiveConf.ConfVars.HIVEPPDREMOVEDUPLICATEFILTERS)) { return createFilter((Operator)nd, prunePreds.getResidualPredicates(true), owi); } return null; } }
private static void removeAllCandidates(OpWalkerInfo owi) { for (FilterOperator operator : owi.getCandidateFilterOps()) { removeOperator(operator); } owi.getCandidateFilterOps().clear(); }
public static NodeProcessor getSCRProc() { return new ScriptPPD(); }
public static NodeProcessor getColumnProcessor() { return new ColumnExprProcessor(); }
private static NodeProcessor getFieldProcessor() { return new FieldExprProcessor(); }
public static NodeProcessor getLVFProc() { return new LateralViewForwardPPD(); }
public static NodeProcessor getDefaultExprProcessor() { return new DefaultExprProcessor(); }
public static NodeProcessor getDefaultProc() { return new DefaultPPD(); }
public static NodeProcessor getRSProc() { return new ReduceSinkPPD(); }
public static NodeProcessor getFilterProc() { return new FilterPPD(); }
public static NodeProcessor getGenericFuncProcessor() { return new GenericFuncExprProcessor(); }
public static NodeProcessor getUDTFProc() { return new UDTFPPD(); }
public static NodeProcessor getPTFProc() { return new PTFPPD(); }
public static NodeProcessor getLVJProc() { return new JoinerPPD(); }
protected static Object createFilter(Operator op, ExprWalkerInfo pushDownPreds, OpWalkerInfo owi) { if (pushDownPreds != null && pushDownPreds.hasAnyCandidates()) { return createFilter(op, pushDownPreds.getFinalCandidates(), owi); } return null; }
@Override public Object process(Node nd, Stack<Node> stack, NodeProcessorCtx procCtx, Object... nodeOutputs) throws SemanticException { ExprWalkerInfo ctx = (ExprWalkerInfo) procCtx; ExprInfo exprInfo = ctx.addOrGetExprInfo((ExprNodeDesc) nd); exprInfo.isCandidate = true; return true; } }