/** * Derives the type of a call to this operator. * * <p>This method is an intrinsic part of the validation process so, unlike * {@link #inferReturnType}, specific operators would not typically override * this method. * * @param validator Validator * @param scope Scope of validation * @param call Call to this operator * * @return Type of call */ public RelDataType deriveType( SqlValidator validator, SqlValidatorScope scope, SqlCall call) { for (SqlNode operand : call.operands) { RelDataType nodeType = validator.deriveType(scope, operand); assert nodeType != null; } RelDataType type = validateOperands(validator, scope, call); // Validate and determine coercibility and resulting collation // name of binary operator if needed. type = adjustType(validator, call, type); SqlValidatorUtil.checkCharsetAndCollateConsistentIfCharType(type); return type; }
/** * Derives the type of a call to this operator. * * <p>This method is an intrinsic part of the validation process so, unlike * {@link #inferReturnType}, specific operators would not typically override * this method. * * @param validator Validator * @param scope Scope of validation * @param call Call to this operator * @return Type of call */ public RelDataType deriveType( SqlValidator validator, SqlValidatorScope scope, SqlCall call) { for (SqlNode operand : call.getOperandList()) { RelDataType nodeType = validator.deriveType(scope, operand); assert nodeType != null; } RelDataType type = validateOperands(validator, scope, call); // Validate and determine coercibility and resulting collation // name of binary operator if needed. type = adjustType(validator, call, type); SqlValidatorUtil.checkCharsetAndCollateConsistentIfCharType(type); return type; }
charset, collation); SqlValidatorUtil.checkCharsetAndCollateConsistentIfCharType(type); return type;
charset, collation); SqlValidatorUtil.checkCharsetAndCollateConsistentIfCharType(type); return type;