/** * Throws an error if the type is not built-in. */ public RelDataType deriveType(SqlValidator validator) { String name = typeName.getSimple(); // for now we only support builtin datatypes if (SqlTypeName.get(name) == null) { throw validator.newValidationError(this, RESOURCE.unknownDatatypeName(name)); } if (null != collectionsTypeName) { final String collectionName = collectionsTypeName.getSimple(); if (SqlTypeName.get(collectionName) == null) { throw validator.newValidationError(this, RESOURCE.unknownDatatypeName(collectionName)); } } RelDataTypeFactory typeFactory = validator.getTypeFactory(); return deriveType(typeFactory); }
/** * Throws an error if the type is not built-in. */ public RelDataType deriveType(SqlValidator validator) { String name = typeName.getSimple(); // for now we only support builtin datatypes if (SqlTypeName.get(name) == null) { throw validator.newValidationError( this, EigenbaseResource.instance().UnknownDatatypeName.ex(name)); } if (null != collectionsTypeName) { final String collectionName = collectionsTypeName.getSimple(); if (!(SqlTypeName.get(collectionName) != null)) { throw validator.newValidationError( this, EigenbaseResource.instance().UnknownDatatypeName.ex( collectionName)); } } RelDataTypeFactory typeFactory = validator.getTypeFactory(); return deriveType(typeFactory); }