Exemplo n.º 1
0
 public RelDataType getNamedType(SqlIdentifier typeName) {
   if (typeName.equalsDeep(addressType.getSqlIdentifier(), false)) {
     return addressType;
   } else {
     return null;
   }
 }
Exemplo n.º 2
0
 public SqlIdentifier fullyQualify(SqlIdentifier identifier) {
   // If it's a simple identifier, look for an alias.
   if (identifier.isSimple() && validator.getConformance().isSortByAlias()) {
     String name = identifier.names.get(0);
     final SqlValidatorNamespace selectNs = validator.getNamespace(select);
     final RelDataType rowType = selectNs.getRowType();
     if (validator.catalogReader.field(rowType, name) != null) {
       return identifier;
     }
   }
   return super.fullyQualify(identifier);
 }
 // implement DdlStmt
 public void preValidate(FarragoSessionDdlValidator ddlValidator) {
   super.preValidate(ddlValidator);
   if (parsedExpr instanceof SqlIdentifier) {
     catalogName = (SqlIdentifier) parsedExpr;
     if (!catalogName.isSimple()) {
       catalogName = null;
     }
   }
   if (catalogName == null) {
     throw FarragoResource.instance()
         .ValidatorSetCatalogInvalidExpr
         .ex(ddlValidator.getRepos().getLocalizedObjectName(valueString));
   }
 }