/** * Validates this node in an expression context. * * <p>Usually, this method does much the same as {@link #validate}, but a {@link SqlIdentifier} * can occur in expression and non-expression contexts. */ public void validateExpr(SqlValidator validator, SqlValidatorScope scope) { validate(validator, scope); Util.discard(validator.deriveType(scope, this)); }
public RelDataType deriveType(SqlValidator validator, SqlValidatorScope scope, SqlCall call) { // special case for AS: never try to derive type for alias RelDataType nodeType = validator.deriveType(scope, call.operands[0]); assert nodeType != null; return validateOperands(validator, scope, call); }