private boolean go(RexNode cond) { cond.accept(this); return res; } }
public Void apply(RexNode input) { return input.accept(eF); } }));
public Double estimateSelectivity(RexNode predicate) { return predicate.accept(this); }
protected RexNode removeCorrelationExpr( RexNode exp, boolean projectPulledAboveLeftCorrelator, RexInputRef nullIndicator) { RemoveCorrelationRexShuttle shuttle = new RemoveCorrelationRexShuttle(rexBuilder, projectPulledAboveLeftCorrelator, nullIndicator, ImmutableSet.<Integer>of()); return exp.accept(shuttle); }
public static RexSubQuery find(Iterable<RexNode> nodes) { for (RexNode node : nodes) { try { node.accept(INSTANCE); } catch (Util.FoundOne e) { return (RexSubQuery) e.getNode(); } } return null; }
public static RexSubQuery find(RexNode node) { try { node.accept(INSTANCE); return null; } catch (Util.FoundOne e) { return (RexSubQuery) e.getNode(); } } }
protected RexNode removeCorrelationExpr( RexNode exp, boolean projectPulledAboveLeftCorrelator) { RemoveCorrelationRexShuttle shuttle = new RemoveCorrelationRexShuttle(rexBuilder, projectPulledAboveLeftCorrelator, null, ImmutableSet.<Integer>of()); return exp.accept(shuttle); }
@Override public Boolean visitFieldAccess(RexFieldAccess fieldAccess) { // "<expr>.FIELD" is constant iff "<expr>" is constant. return fieldAccess.getReferenceExpr().accept(this); }
protected RexNode removeCorrelationExpr( RexNode exp, boolean projectPulledAboveLeftCorrelator, Set<Integer> isCount) { RemoveCorrelationRexShuttle shuttle = new RemoveCorrelationRexShuttle(rexBuilder, projectPulledAboveLeftCorrelator, null, isCount); return exp.accept(shuttle); }
private BinaryTupleExpression getBinaryTupleExpression(RexCall call, TupleExpression.ExpressionOperatorEnum op) { assert call.operands.size() == 2; TupleExpression left = call.operands.get(0).accept(this); TupleExpression right = call.operands.get(1).accept(this); BinaryTupleExpression tuple = new BinaryTupleExpression(op, Lists.newArrayList(left, right)); tuple.setDigest(call.toString()); return tuple; }
public static boolean canSplitFilter(RexNode cond, SqlDialect dialect) { FilterSupportedFunctionsVisitor visitor = new FilterSupportedFunctionsVisitor(dialect); cond.accept(visitor); return visitor.canBeSplit(); }
protected RexNode decorrelateExpr(RexNode exp) { DecorrelateRexShuttle shuttle = new DecorrelateRexShuttle(); shuttle.setValueGenerator(true); return exp.accept(shuttle); }
public static Set<Integer> getInputRefs(RexNode expr) { InputRefsCollector irefColl = new InputRefsCollector(true); expr.accept(irefColl); return irefColl.getInputRefSet(); }
protected RexNode decorrelateExpr(RexNode exp, boolean valueGenerator) { DecorrelateRexShuttle shuttle = new DecorrelateRexShuttle(); shuttle.setValueGenerator(valueGenerator); return exp.accept(shuttle); } protected RexNode decorrelateExpr(RexNode exp) {
private RexCallTupleExpression getRexCallTupleExpression(RexCall call) { List<TupleExpression> children = Lists.newArrayListWithExpectedSize(call.getOperands().size()); for (RexNode rexNode : call.operands) { children.add(rexNode.accept(this)); } RexCallTupleExpression tuple = new RexCallTupleExpression(children); tuple.setDigest(call.toString()); return tuple; }
public static ExprNodeDesc getExprNode(Integer inputRefIndx, RelNode inputRel, ExprNodeConverter exprConv) { ExprNodeDesc exprNode = null; RexNode rexInputRef = new RexInputRef(inputRefIndx, inputRel.getRowType() .getFieldList().get(inputRefIndx).getType()); exprNode = rexInputRef.accept(exprConv); return exprNode; }
private static ExprNodeDesc convertToExprNode(RexNode rn, RelNode inputRel, String tabAlias, Set<Integer> vcolsInCalcite) { return rn.accept(new ExprNodeConverter(tabAlias, inputRel.getRowType(), vcolsInCalcite, inputRel.getCluster().getTypeFactory(), true)); }
public RelNode visit(final HiveProject project) { try { Stacks.push(stack, project); for (RexNode node : project.getProjects()) { node.accept(rexVisitor(project)); } } finally { Stacks.pop(stack, project); } return super.visit(project); }
public RelNode visit(final HiveFilter filter) { try { Stacks.push(stack, filter); filter.getCondition().accept(rexVisitor(filter)); } finally { Stacks.pop(stack, filter); } return super.visit(filter); }
public RelNode visit(HiveJoin join) { try { Stacks.push(stack, join); join.getCondition().accept(rexVisitor(join)); } finally { Stacks.pop(stack, join); } return visitJoin(join); }