/** * Merges the specified pushdown predicates with the current class. * * @param ewi * ExpressionWalkerInfo */ public void merge(ExprWalkerInfo ewi) { if (ewi == null) { return; } for (Entry<String, List<ExprNodeDesc>> e : ewi.getFinalCandidates() .entrySet()) { List<ExprNodeDesc> predList = pushdownPreds.get(e.getKey()); if (predList != null) { predList.addAll(e.getValue()); } else { pushdownPreds.put(e.getKey(), e.getValue()); } } for (Entry<String, List<ExprNodeDesc>> e : ewi.getNonFinalCandidates() .entrySet()) { List<ExprNodeDesc> predList = nonFinalPreds.get(e.getKey()); if (predList != null) { predList.addAll(e.getValue()); } else { nonFinalPreds.put(e.getKey(), e.getValue()); } } newToOldExprMap.putAll(ewi.getNewToOldExprMap()); }
/** * Merges the specified pushdown predicates with the current class. * * @param ewi * ExpressionWalkerInfo */ public void merge(ExprWalkerInfo ewi) { if (ewi == null) { return; } for (Entry<String, List<ExprNodeDesc>> e : ewi.getFinalCandidates() .entrySet()) { List<ExprNodeDesc> predList = pushdownPreds.get(e.getKey()); if (predList != null) { predList.addAll(e.getValue()); } else { pushdownPreds.put(e.getKey(), e.getValue()); } } for (Entry<String, List<ExprNodeDesc>> e : ewi.getNonFinalCandidates() .entrySet()) { List<ExprNodeDesc> predList = nonFinalPreds.get(e.getKey()); if (predList != null) { predList.addAll(e.getValue()); } else { nonFinalPreds.put(e.getKey(), e.getValue()); } } newToOldExprMap.putAll(ewi.getNewToOldExprMap()); }
if (!extractPushdownPreds.getNonFinalCandidates().isEmpty()) { hasUnpushedPredicates = true;
if (!extractPushdownPreds.getNonFinalCandidates().isEmpty()) { hasUnpushedPredicates = true;
@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; }
walkerInfo.getNonFinalCandidates().clear(); owi.putPrunedPreds(output, walkerInfo);
walkerInfo.getNonFinalCandidates().clear(); owi.putPrunedPreds(output, walkerInfo);
/** * Merges the specified pushdown predicates with the current class. * * @param ewi * ExpressionWalkerInfo */ public void merge(ExprWalkerInfo ewi) { if (ewi == null) { return; } for (Entry<String, List<ExprNodeDesc>> e : ewi.getFinalCandidates() .entrySet()) { List<ExprNodeDesc> predList = pushdownPreds.get(e.getKey()); if (predList != null) { predList.addAll(e.getValue()); } else { pushdownPreds.put(e.getKey(), e.getValue()); } } for (Entry<String, List<ExprNodeDesc>> e : ewi.getNonFinalCandidates() .entrySet()) { List<ExprNodeDesc> predList = nonFinalPreds.get(e.getKey()); if (predList != null) { predList.addAll(e.getValue()); } else { nonFinalPreds.put(e.getKey(), e.getValue()); } } newToOldExprMap.putAll(ewi.getNewToOldExprMap()); }
if (!extractPushdownPreds.getNonFinalCandidates().isEmpty()) { hasUnpushedPredicates = true;
@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; }
walkerInfo.getNonFinalCandidates().clear(); owi.putPrunedPreds(output, walkerInfo);
HiveConf.ConfVars.HIVEPPDREMOVEDUPLICATEFILTERS)) { if (ewi.getNonFinalCandidates().values().isEmpty()) { owi.addCandidateFilterOp((FilterOperator)op);