public RexNode visitCall(RexCall call) { final RexNode expr = super.visitCall(call); return registerInternal(expr, false); }
public RexNode visitCall(RexCall call) { final RexNode expr = super.visitCall(call); return registerInternal(expr, false); }
public RexNode visitCall(RexCall call) { final SqlOperator op = call.getOperator(); if (!(op instanceof SqlAggFunction)) { return super.visitCall(call);
public RexNode visitCall(RexCall call) { RexNode newCall = super.visitCall(call); if (call.getOperator() == SqlStdOperatorTable.IS_NOT_DISTINCT_FROM) { RexCall tmpCall = (RexCall) newCall; newCall = RelOptUtil.isDistinctFrom( rexBuilder, tmpCall.operands.get(0), tmpCall.operands.get(1), true); } return newCall; } }
public RexNode visitCall(RexCall call) { RexNode newCall = super.visitCall(call); if (call.getOperator() == SqlStdOperatorTable.isNotDistinctFromOperator) { RexCall tmpCall = (RexCall) newCall; newCall = RelOptUtil.isDistinctFrom( rexBuilder, tmpCall.operands.get(0), tmpCall.operands.get(1), true); } return newCall; } }
@Override public RexNode visitCall(RexCall call) { final Integer integer = map.get(call.toString()); if (integer != null) { return new RexInputRef(integer, call.getType()); } return super.visitCall(call); } };
@Override public RexNode visitCall(RexCall call) { if (call.getOperator() == RexBuilder.GET_OPERATOR) { final String name = (String) ((RexLiteral) call.getOperands().get(1)).getValue2(); final int i = lookup(fields, name); if (i >= 0) { return RexInputRef.of(i, fields); } } return super.visitCall(call); }
@Override public RexNode visitCall(final RexCall call) { int i = reducibleExps.indexOf(call); if (i == -1) { return super.visitCall(call); } RexNode replacement = reducedValues.get(i); if (addCasts.get(i) && (replacement.getType() != call.getType())) { // Handle change from nullable to NOT NULL by claiming // that the result is still nullable, even though // we know it isn't. // // Also, we cannot reduce CAST('abc' AS VARCHAR(4)) to 'abc'. // If we make 'abc' of type VARCHAR(4), we may later encounter // the same expression in a ProjectRel's digest where it has // type VARCHAR(3), and that's wrong. replacement = rexBuilder.makeCast( call.getType(), replacement); } return replacement; } }
@Override public RexNode visitCall(RexCall call) { if (call.getOperator() == RexBuilder.GET_OPERATOR) { final String name = (String) ((RexLiteral) call.getOperands().get(1)).getValue2(); final int i = lookup(fields, name); if (i >= 0) { return RexInputRef.of(i, fields); } } return super.visitCall(call); }
@Override public RexNode visitCall(RexCall call) { String fieldName = parseFieldAccess(call); if (fieldName != null) { return registerField(fieldName, call.getType()); } RelDataType type = parseCast(call); if (type != null) { final RexNode operand = call.getOperands().get(0); fieldName = parseFieldAccess(operand); if (fieldName != null) { return registerField(fieldName, call.getType()); } // just ignore the cast return operand.accept(this); } return super.visitCall(call); }
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 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 call) { final SqlOperator op = call.getOperator(); if (!(op instanceof SqlAggFunction)) { return super.visitCall(call);
return super.visitCall(call);