public static boolean canReinterpretOverflow(RexCall call) { assert (call.isA(RexKind.Reinterpret)) : "call is not a reinterpret"; return call.operands.size() > 1; }
public static boolean canReinterpretOverflow(RexCall call) { assert call.isA(SqlKind.REINTERPRET) : "call is not a reinterpret"; return call.operands.size() > 1; }
public boolean canExpand(RexCall call) { return call.isA(SqlKind.REINTERPRET) && call.operands.get(0).isA(SqlKind.REINTERPRET); }
public boolean canExpand(RexCall call) { return call.isA(RexKind.Reinterpret) && call.operands.get(0).isA(RexKind.Reinterpret); }
private boolean isConstructor(RexNode rexNode) { // TODO jvs 11-Feb-2005: share code with SqlToRelConverter if (!(rexNode instanceof RexCall)) { return false; } RexCall call = (RexCall) rexNode; return call.getOperator().getName().equalsIgnoreCase("row") || (call.isA(SqlKind.NEW_SPECIFICATION)); }
private boolean isConstructor(RexNode rexNode) { // TODO jvs 11-Feb-2005: share code with SqlToRelConverter if (!(rexNode instanceof RexCall)) { return false; } RexCall call = (RexCall) rexNode; return call.getOperator().getName().equalsIgnoreCase("row") || (call.isA(RexKind.NewSpecification)); }
if (call.isA(RexKind.MinusPrefix)) { distinctRowCount = cardOfProjExpr(rel, call.getOperands().get(0)); } else if (call.isA(RexKind.Plus) || call.isA(RexKind.Minus)) { Double card0 = cardOfProjExpr(rel, call.getOperands().get(0)); if (card0 == null) { } else if (call.isA(RexKind.Times) || call.isA(RexKind.Divide)) { distinctRowCount = NumberUtil.multiply(
if (call.isA(RexKind.Plus)) { return expandPlusMinus(call, operands); } else if (call.isA(RexKind.Minus)) { return expandPlusMinus(call, operands); } else if (call.isA(RexKind.Divide)) { return expandDivide(call, operands); } else if (call.isA(RexKind.Times)) { return expandTimes(call, operands); } else if (call.isA(RexKind.Comparison)) { return expandComparison(call, operands); } else if (call.getOperator() == SqlStdOperatorTable.modFunc) {
public Double visitCall(RexCall call) { Double distinctRowCount; Double rowCount = RelMetadataQuery.getRowCount(rel); if (call.isA(SqlKind.MINUS_PREFIX)) { distinctRowCount = cardOfProjExpr(rel, call.getOperands().get(0)); } else if (call.isA(ImmutableList.of(SqlKind.PLUS, SqlKind.MINUS))) { Double card0 = cardOfProjExpr(rel, call.getOperands().get(0)); if (card0 == null) { } else if (call.isA( ImmutableList.of(SqlKind.TIMES, SqlKind.DIVIDE))) { distinctRowCount =
if (call.isA(SqlKind.PLUS)) { return expandPlusMinus(call, operands); } else if (call.isA(SqlKind.MINUS)) { return expandPlusMinus(call, operands); } else if (call.isA(SqlKind.DIVIDE)) { return expandDivide(call, operands); } else if (call.isA(SqlKind.TIMES)) { return expandTimes(call, operands); } else if (call.isA(SqlKind.COMPARISON)) { return expandComparison(call, operands); } else if (call.getOperator() == SqlStdOperatorTable.MOD) {
public RexNode visitCall(RexCall rexCall) { if (rexCall.isA(RexKind.Cast)) { RexNode input = rexCall.getOperands().get(0).accept(this); RelDataType targetType = removeDistinct(rexCall.getType()); return rexBuilder.makeCast( targetType, input); } if (!rexCall.isA(RexKind.Comparison)) { return super.visitCall(rexCall); } RexNode lhs = rexCall.getOperands().get(0); if (!lhs.getType().isStruct()) { // NOTE jvs 9-Mar-2005: Calls like IS NULL operate // on the representative null indicator. Since it comes // first, we don't have to do any special translation. return super.visitCall(rexCall); } // NOTE jvs 22-Mar-2005: Likewise, the null indicator takes // care of comparison null semantics without any special casing. return flattenComparison( rexBuilder, rexCall.getOperator(), rexCall.getOperands()); }
public RexNode visitCall(RexCall rexCall) { if (rexCall.isA(SqlKind.CAST)) { RexNode input = rexCall.getOperands().get(0).accept(this); RelDataType targetType = removeDistinct(rexCall.getType()); return rexBuilder.makeCast( targetType, input); } if (!rexCall.isA(SqlKind.COMPARISON)) { return super.visitCall(rexCall); } RexNode lhs = rexCall.getOperands().get(0); if (!lhs.getType().isStruct()) { // NOTE jvs 9-Mar-2005: Calls like IS NULL operate // on the representative null indicator. Since it comes // first, we don't have to do any special translation. return super.visitCall(rexCall); } // NOTE jvs 22-Mar-2005: Likewise, the null indicator takes // care of comparison null semantics without any special casing. return flattenComparison( rexBuilder, rexCall.getOperator(), rexCall.getOperands()); }
public RexNode expand(RexCall call) { List<RexNode> operands = call.operands; assert call.isA(SqlKind.CAST); assert operands.size() == 1; assert !RexLiteral.isNullLiteral(operands.get(0));
public RexNode expand(RexCall call) assert call.isA(RexKind.Cast); assert operands.size() == 1; assert !RexLiteral.isNullLiteral(operands.get(0));