@Override public boolean isSame(OperatorDesc other) { if (getClass().getName().equals(other.getClass().getName())) { FilterDesc otherDesc = (FilterDesc) other; return Objects.equals(getPredicateString(), otherDesc.getPredicateString()) && Objects.equals(getSampleDescExpr(), otherDesc.getSampleDescExpr()) && getIsSamplingPred() == otherDesc.getIsSamplingPred(); } return false; }
if (fop2 != null && !fop2.getConf().getIsSamplingPred()) { return null; if (fop.getConf().getIsSamplingPred()) { return null;
if (fop2 != null && !fop2.getConf().getIsSamplingPred()) { return null; if (fop.getConf().getIsSamplingPred()) { return null;
@Override public Object clone() { FilterDesc filterDesc = new FilterDesc(getPredicate().clone(), getIsSamplingPred()); if (getIsSamplingPred()) { filterDesc.setSampleDescr(getSampleDescr()); } filterDesc.setSortedFilter(isSortedFilter()); return filterDesc; }
@Override public Object clone() { FilterDesc filterDesc = new FilterDesc(getPredicate().clone(), getIsSamplingPred()); if (getIsSamplingPred()) { filterDesc.setSampleDescr(getSampleDescr()); } filterDesc.setSortedFilter(isSortedFilter()); return filterDesc; }
if (filterConf.getIsSamplingPred()) { return null;
FilterDesc op2Conf = ((FilterOperator) currentOp2).getConf(); if (op1Conf.getIsSamplingPred() == op2Conf.getIsSamplingPred() && StringUtils.equals(op1Conf.getSampleDescExpr(), op2Conf.getSampleDescExpr())) { Multiset<String> conjsOp1String = extractConjsIgnoringDPPPreds(op1Conf.getPredicate());
@Override public boolean equals(FilterOperator op1, FilterOperator op2) { Preconditions.checkNotNull(op1); Preconditions.checkNotNull(op2); FilterDesc op1Conf = op1.getConf(); FilterDesc op2Conf = op2.getConf(); if (compareString(op1Conf.getPredicateString(), op2Conf.getPredicateString()) && (op1Conf.getIsSamplingPred() == op2Conf.getIsSamplingPred()) && compareString(op1Conf.getSampleDescExpr(), op2Conf.getSampleDescExpr())) { return true; } else { return false; } } }
if (fop2 != null && !fop2.getConf().getIsSamplingPred()) { return null; if (fop.getConf().getIsSamplingPred()) { return null;
if (fop2 != null && !fop2.getConf().getIsSamplingPred()) { return null; if (fop.getConf().getIsSamplingPred()) { return null;
@Override public Object process(Node nd, Stack<Node> stack, NodeProcessorCtx procCtx, Object... nodeOutputs) throws SemanticException { FilterOperator cFIL = (FilterOperator) nd; FilterOperator pFIL = (FilterOperator) stack.get(stack.size() - 2); // Sampling predicates can be merged with predicates from children because PPD/PPR is // already applied. But to clarify the intention of sampling, just skips merging. if (pFIL.getConf().getIsSamplingPred()) { return null; } List<ExprNodeDesc> splits = new ArrayList<ExprNodeDesc>(); ExprNodeDescUtils.split(cFIL.getConf().getPredicate(), splits); ExprNodeDescUtils.split(pFIL.getConf().getPredicate(), splits); pFIL.getConf().setPredicate(ExprNodeDescUtils.mergePredicates(splits)); // if any of filter is sorted filter, it's sorted filter boolean sortedFilter = pFIL.getConf().isSortedFilter() || cFIL.getConf().isSortedFilter(); pFIL.getConf().setSortedFilter(sortedFilter); pFIL.removeChildAndAdoptItsChildren(cFIL); cFIL.setParentOperators(null); cFIL.setChildOperators(null); cFIL = null; return null; } }
@Override public Object process(Node nd, Stack<Node> stack, NodeProcessorCtx procCtx, Object... nodeOutputs) throws SemanticException { FilterOperator cFIL = (FilterOperator) nd; FilterOperator pFIL = (FilterOperator) stack.get(stack.size() - 2); // Sampling predicates can be merged with predicates from children because PPD/PPR is // already applied. But to clarify the intention of sampling, just skips merging. if (pFIL.getConf().getIsSamplingPred()) { return null; } List<ExprNodeDesc> splits = new ArrayList<ExprNodeDesc>(); ExprNodeDescUtils.split(cFIL.getConf().getPredicate(), splits); ExprNodeDescUtils.split(pFIL.getConf().getPredicate(), splits); pFIL.getConf().setPredicate(ExprNodeDescUtils.mergePredicates(splits)); // if any of filter is sorted filter, it's sorted filter boolean sortedFilter = pFIL.getConf().isSortedFilter() || cFIL.getConf().isSortedFilter(); pFIL.getConf().setSortedFilter(sortedFilter); pFIL.removeChildAndAdoptItsChildren(cFIL); cFIL.setParentOperators(null); cFIL.setChildOperators(null); cFIL = null; return null; } }
if (filterConf.getIsSamplingPred()) { return null;
if (ewi == null && !((FilterOperator)op).getConf().getIsSamplingPred() && (!onlySyntheticJoinPredicate || ((FilterOperator)op).getConf().isSyntheticJoinPredicate())) {
if (ewi == null && !((FilterOperator)op).getConf().getIsSamplingPred() && (!onlySyntheticJoinPredicate || ((FilterOperator)op).getConf().isSyntheticJoinPredicate())) {
if (fop2 != null && !fop2.getConf().getIsSamplingPred()) { return null; if (fop.getConf().getIsSamplingPred()) { return null;
@Override public Object clone() { FilterDesc filterDesc = new FilterDesc(getPredicate().clone(), getIsSamplingPred()); if (getIsSamplingPred()) { filterDesc.setSampleDescr(getSampleDescr()); } filterDesc.setSortedFilter(isSortedFilter()); return filterDesc; } }
if (fop2 != null && !fop2.getConf().getIsSamplingPred()) { return null; if (fop.getConf().getIsSamplingPred()) { return null;
@Override public Object process(Node nd, Stack<Node> stack, NodeProcessorCtx procCtx, Object... nodeOutputs) throws SemanticException { FilterOperator cFIL = (FilterOperator) nd; FilterOperator pFIL = (FilterOperator) stack.get(stack.size() - 2); // Sampling predicates can be merged with predicates from children because PPD/PPR is // already applied. But to clarify the intention of sampling, just skips merging. if (pFIL.getConf().getIsSamplingPred()) { return null; } List<ExprNodeDesc> splits = new ArrayList<ExprNodeDesc>(); ExprNodeDescUtils.split(cFIL.getConf().getPredicate(), splits); ExprNodeDescUtils.split(pFIL.getConf().getPredicate(), splits); pFIL.getConf().setPredicate(ExprNodeDescUtils.mergePredicates(splits)); // if any of filter is sorted filter, it's sorted filter boolean sortedFilter = pFIL.getConf().isSortedFilter() || cFIL.getConf().isSortedFilter(); pFIL.getConf().setSortedFilter(sortedFilter); pFIL.removeChildAndAdoptItsChildren(cFIL); cFIL.setParentOperators(null); cFIL.setChildOperators(null); cFIL = null; return null; } }
if (ewi == null && !((FilterOperator)op).getConf().getIsSamplingPred()) {