Example #1
0
 public RelDataType getNamedType(SqlIdentifier typeName) {
   if (typeName.equalsDeep(addressType.getSqlIdentifier(), false)) {
     return addressType;
   } else {
     return null;
   }
 }
Example #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);
 }