@Override public Object process(Node nd, Stack<Node> stack, NodeProcessorCtx procCtx, Object... nodeOutputs) throws SemanticException { // We can only push down stuff which appears as part of // a pure conjunction: reject OR, CASE, etc. for (Node ancestor : stack) { if (nd == ancestor) { break; } if (!FunctionRegistry.isOpAnd((ExprNodeDesc) ancestor)) { return nd; } } return analyzeExpr((ExprNodeGenericFuncDesc) nd, searchConditions, nodeOutputs); } };
@Override public Object process(Node nd, Stack<Node> stack, NodeProcessorCtx procCtx, Object... nodeOutputs) throws SemanticException { // We can only push down stuff which appears as part of // a pure conjunction: reject OR, CASE, etc. for (Node ancestor : stack) { if (nd == ancestor) { break; } if (!FunctionRegistry.isOpAnd((ExprNodeDesc) ancestor)) { return nd; } } return analyzeExpr((ExprNodeGenericFuncDesc) nd, searchConditions, nodeOutputs); } };
/** * bind two predicates by AND op */ public static ExprNodeGenericFuncDesc mergePredicates(ExprNodeDesc prev, ExprNodeDesc next) { final List<ExprNodeDesc> children = new ArrayList<ExprNodeDesc>(2); if (FunctionRegistry.isOpAnd(prev)) { children.addAll(prev.getChildren()); } else { children.add(prev); } if (FunctionRegistry.isOpAnd(next)) { children.addAll(next.getChildren()); } else { children.add(next); } return new ExprNodeGenericFuncDesc(TypeInfoFactory.booleanTypeInfo, FunctionRegistry.getGenericUDFForAnd(), children); }
/** * bind two predicates by AND op */ public static ExprNodeGenericFuncDesc mergePredicates(ExprNodeDesc prev, ExprNodeDesc next) { final List<ExprNodeDesc> children = new ArrayList<ExprNodeDesc>(2); if (FunctionRegistry.isOpAnd(prev)) { children.addAll(prev.getChildren()); } else { children.add(prev); } if (FunctionRegistry.isOpAnd(next)) { children.addAll(next.getChildren()); } else { children.add(next); } return new ExprNodeGenericFuncDesc(TypeInfoFactory.booleanTypeInfo, FunctionRegistry.getGenericUDFForAnd(), children); }
/** * split predicates by AND op */ public static List<ExprNodeDesc> split(ExprNodeDesc current, List<ExprNodeDesc> splitted) { if (FunctionRegistry.isOpAnd(current)) { for (ExprNodeDesc child : current.getChildren()) { split(child, splitted); } return splitted; } if (indexOf(current, splitted) < 0) { splitted.add(current); } return splitted; }
/** * split predicates by AND op */ public static List<ExprNodeDesc> split(ExprNodeDesc current, List<ExprNodeDesc> splitted) { if (FunctionRegistry.isOpAnd(current)) { for (ExprNodeDesc child : current.getChildren()) { split(child, splitted); } return splitted; } if (indexOf(current, splitted) < 0) { splitted.add(current); } return splitted; }
/** * return true if predicate is already included in source */ public static boolean containsPredicate(ExprNodeDesc source, ExprNodeDesc predicate) { if (source.isSame(predicate)) { return true; } if (FunctionRegistry.isOpAnd(source)) { if (containsPredicate(source.getChildren().get(0), predicate) || containsPredicate(source.getChildren().get(1), predicate)) { return true; } } return false; }
/** * return true if predicate is already included in source */ public static boolean containsPredicate(ExprNodeDesc source, ExprNodeDesc predicate) { if (source.isSame(predicate)) { return true; } if (FunctionRegistry.isOpAnd(source)) { if (containsPredicate(source.getChildren().get(0), predicate) || containsPredicate(source.getChildren().get(1), predicate)) { return true; } } return false; }
if (FunctionRegistry.isOpAnd(child)) { for (ExprNodeDesc newChild : child.getChildren()) { collect(child, newChild, listContext);
return pushOrOp(expr); if (FunctionRegistry.isOpAnd(expr)) { return pushAndOp(expr);
if (FunctionRegistry.isOpAnd(child)) { for (ExprNodeDesc newChild : child.getChildren()) { collect(child, newChild, listContext);
Object... nodeOutputs) throws SemanticException { if (FunctionRegistry.isOpAnd(expr)) { assert(nodeOutputs.length >= 2); List<ExprNodeDesc> residuals = new ArrayList<ExprNodeDesc>();
ExprNodeDesc other = removeNonPartCols(children.get(i), partCols, referred); if (ExprNodeDescUtils.isNullConstant(other)) { if (FunctionRegistry.isOpAnd(expr)) {
Object... nodeOutputs) throws SemanticException { if (FunctionRegistry.isOpAnd(expr)) { assert(nodeOutputs.length >= 2); List<ExprNodeDesc> residuals = new ArrayList<ExprNodeDesc>();
if (((ExprNodeGenericFuncDesc) node).getGenericUDF() instanceof GenericUDFOPEqual) { return evaluateEqualNd(node, skewedCols, cell, uniqSkewedValues); } else if (FunctionRegistry.isOpAnd(node)) { return evaluateAndNode(node, skewedCols, cell, uniqSkewedValues); } else if (FunctionRegistry.isOpOr(node)) {
if (((ExprNodeGenericFuncDesc) node).getGenericUDF() instanceof GenericUDFOPEqual) { return evaluateEqualNd(node, skewedCols, cell, uniqSkewedValues); } else if (FunctionRegistry.isOpAnd(node)) { return evaluateAndNode(node, skewedCols, cell, uniqSkewedValues); } else if (FunctionRegistry.isOpOr(node)) {
} else if (FunctionRegistry.isOpAnd(fd)) { return handleUdfAnd(ctx, fd, nodeOutputs); } else if (FunctionRegistry.isOpOr(fd)) {
} else if (FunctionRegistry.isOpAnd(fd)) { return handleUdfAnd(ctx, fd, nodeOutputs); } else if (FunctionRegistry.isOpOr(fd)) {