private static void removeAllCandidates(OpWalkerInfo owi) { for (FilterOperator operator : owi.getCandidateFilterOps()) { removeOperator(operator); } owi.getCandidateFilterOps().clear(); }
private static void removeAllCandidates(OpWalkerInfo owi) { for (FilterOperator operator : owi.getCandidateFilterOps()) { removeOperator(operator); } owi.getCandidateFilterOps().clear(); }
private static void removeCandidates(Operator<?> operator, OpWalkerInfo owi) { if (operator instanceof FilterOperator) { if (owi.getCandidateFilterOps().contains(operator)) { removeOperator(operator); } owi.getCandidateFilterOps().remove(operator); } if (operator.getChildOperators() != null) { List<Operator<? extends OperatorDesc>> children = Lists.newArrayList(operator.getChildOperators()); for (Operator<?> child : children) { removeCandidates(child, owi); } } }
private static void removeCandidates(Operator<?> operator, OpWalkerInfo owi) { if (operator instanceof FilterOperator) { if (owi.getCandidateFilterOps().contains(operator)) { removeOperator(operator); } owi.getCandidateFilterOps().remove(operator); } if (operator.getChildOperators() != null) { List<Operator<? extends OperatorDesc>> children = Lists.newArrayList(operator.getChildOperators()); for (Operator<?> child : children) { removeCandidates(child, owi); } } }
@Override public Object process(Node nd, Stack<Node> stack, NodeProcessorCtx procCtx, Object... nodeOutputs) throws SemanticException { LOG.info("Processing for " + nd.getName() + "(" + ((Operator) nd).getIdentifier() + ")"); OpWalkerInfo owi = (OpWalkerInfo) procCtx; Set<String> includes = getQualifiedAliases((Operator<?>) nd, owi); boolean hasUnpushedPredicates = mergeWithChildrenPred(nd, owi, null, includes); if (hasUnpushedPredicates && HiveConf.getBoolVar(owi.getParseContext().getConf(), HiveConf.ConfVars.HIVEPPDREMOVEDUPLICATEFILTERS)) { if (includes != null || nd instanceof ReduceSinkOperator) { owi.getCandidateFilterOps().clear(); } else { ExprWalkerInfo pruned = owi.getPrunedPreds((Operator<? extends OperatorDesc>) nd); Map<String, List<ExprNodeDesc>> residual = pruned.getResidualPredicates(true); if (residual != null && !residual.isEmpty()) { createFilter((Operator) nd, residual, owi); pruned.getNonFinalCandidates().clear(); } } } return null; }
@Override public Object process(Node nd, Stack<Node> stack, NodeProcessorCtx procCtx, Object... nodeOutputs) throws SemanticException { LOG.info("Processing for " + nd.getName() + "(" + ((Operator) nd).getIdentifier() + ")"); OpWalkerInfo owi = (OpWalkerInfo) procCtx; Set<String> includes = getQualifiedAliases((Operator<?>) nd, owi); boolean hasUnpushedPredicates = mergeWithChildrenPred(nd, owi, null, includes); if (hasUnpushedPredicates && HiveConf.getBoolVar(owi.getParseContext().getConf(), HiveConf.ConfVars.HIVEPPDREMOVEDUPLICATEFILTERS)) { if (includes != null || nd instanceof ReduceSinkOperator) { owi.getCandidateFilterOps().clear(); } else { ExprWalkerInfo pruned = owi.getPrunedPreds((Operator<? extends OperatorDesc>) nd); Map<String, List<ExprNodeDesc>> residual = pruned.getResidualPredicates(true); if (residual != null && !residual.isEmpty()) { createFilter((Operator) nd, residual, owi); pruned.getNonFinalCandidates().clear(); } } } return null; }
private static void removeCandidates(Operator<?> operator, OpWalkerInfo owi) { if (operator instanceof FilterOperator) { owi.getCandidateFilterOps().remove(operator); } if (operator.getChildOperators() != null) { for (Operator<?> child : operator.getChildOperators()) { removeCandidates(child, owi); } } }
@Override public Object process(Node nd, Stack<Node> stack, NodeProcessorCtx procCtx, Object... nodeOutputs) throws SemanticException { LOG.info("Processing for " + nd.getName() + "(" + ((Operator) nd).getIdentifier() + ")"); OpWalkerInfo owi = (OpWalkerInfo) procCtx; Set<String> includes = getQualifiedAliases((Operator<?>) nd, owi); boolean hasUnpushedPredicates = mergeWithChildrenPred(nd, owi, null, includes); if (hasUnpushedPredicates && HiveConf.getBoolVar(owi.getParseContext().getConf(), HiveConf.ConfVars.HIVEPPDREMOVEDUPLICATEFILTERS)) { if (includes != null || nd instanceof ReduceSinkOperator) { owi.getCandidateFilterOps().clear(); } else { ExprWalkerInfo pruned = owi.getPrunedPreds((Operator<? extends OperatorDesc>) nd); Map<String, List<ExprNodeDesc>> residual = pruned.getResidualPredicates(true); if (residual != null && !residual.isEmpty()) { createFilter((Operator) nd, residual, owi); pruned.getNonFinalCandidates().clear(); } } } return null; }
HiveConf.ConfVars.HIVEPPDREMOVEDUPLICATEFILTERS)) { for (FilterOperator fop : owi.getCandidateFilterOps()) { List<Operator<? extends OperatorDesc>> children = fop.getChildOperators(); List<Operator<? extends OperatorDesc>> parents = fop.getParentOperators(); owi.getCandidateFilterOps().clear();