protected String computeDigest(boolean withType) { return super.computeDigest(withType) + " OVER (" + window + ")"; }
protected String computeDigest(boolean withType) { return super.computeDigest(withType) + " OVER (" + window + ")"; }
protected RexCall( RelDataType type, SqlOperator op, List<? extends RexNode> operands) { assert type != null : "precondition: type != null"; assert op != null : "precondition: op != null"; assert operands != null : "precondition: operands != null"; this.type = type; this.op = op; this.operands = ImmutableList.copyOf(operands); assert op.getKind() != null : op; this.digest = computeDigest(true); assert op.validRexOperands(operands.size(), true) : this; }
public String toString() { // REVIEW jvs 16-Jan-2005: For CAST and NEW, the type is really an // operand and needs to be printed out. But special-casing it here is // ugly. return computeDigest( isA(SqlKind.CAST) || isA(SqlKind.NEW_SPECIFICATION)); }
public String toString() { // REVIEW jvs 16-Jan-2005: For CAST and NEW, the type is really an // operand and needs to be printed out. But special-casing it here is // ugly. return computeDigest( isA(RexKind.Cast) || isA(RexKind.NewSpecification)); }
protected RexCall( RelDataType type, SqlOperator op, List<? extends RexNode> operands) { assert type != null : "precondition: type != null"; assert op != null : "precondition: op != null"; assert operands != null : "precondition: operands != null"; this.type = type; this.op = op; this.operands = ImmutableList.copyOf(operands); this.kind = sqlKindToRexKind(op.getKind()); assert this.kind != null : op; this.digest = computeDigest(true); // TODO zfong 11/19/07 - Extend the check below to all types of // operators, similar to SqlOperator.checkOperandCount. However, // that method operates on SqlCalls, which may have not have the // same number of operands as their corresponding RexCalls. One // example is the CAST operator, which is originally a 2-operand // SqlCall, but is later converted to a 1-operand RexCall. if (op instanceof SqlBinaryOperator) { assert operands.size() == 2; } }