private static PropertySchema fetchSchema(String schemaName, Function<String, PropertySchema> getSchema) {
    PropertySchema schema = getSchema != null ? getSchema.apply(schemaName) : null;
    if (schema == null) {
      LOGGER.warn("unsolvable schema " + schemaName);
      return PropertySchema.NONE;
    } else if (!schema.getName().equals(schemaName)) {
      LOGGER.warn("potential schema mismatch, expected " + schema.getName() + ", got " + schemaName);
    }
    return schema;
  }
Fetches the schema.

@param schemaName the schema name
@param getSchema  the schema function provider
@return a non null schema instance
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/properties/PropertyMap.java