Example #1
0
 public RelDataType getNamedType(SqlIdentifier typeName) {
   if (typeName.equalsDeep(addressType.getSqlIdentifier(), false)) {
     return addressType;
   } else {
     return null;
   }
 }
 public void validateCall(
     SqlCall call,
     SqlValidator validator,
     SqlValidatorScope scope,
     SqlValidatorScope operandScope) {
   // The base method validates all operands. We override because
   // we don't want to validate the identifier.
   final SqlNode[] operands = call.operands;
   assert operands.length == 2;
   assert operands[1] instanceof SqlIdentifier;
   operands[0].validateExpr(validator, scope);
   SqlIdentifier id = (SqlIdentifier) operands[1];
   if (!id.isSimple()) {
     throw validator.newValidationError(
         id, EigenbaseResource.instance().AliasMustBeSimpleIdentifier.ex());
   }
 }