class DatabaseCalciteSchema implements Schema {

	@Override
	public Table getTable(String tableName) {
		ObjectIdentifier identifier = ObjectIdentifier.of(catalogName, databaseName, tableName);
		return catalogManager.getTable(identifier)
			.map(result -> {
				final TableFactory tableFactory;
				if (result.isTemporary()) {
					tableFactory = null;
				} else {
					tableFactory = catalogManager.getCatalog(catalogName)
						.flatMap(Catalog::getTableFactory)
						.orElse(null);
				}
				return convertTable(identifier, result, tableFactory);
			})
			.orElse(null);
	}

	public  DatabaseCalciteSchema(
			boolean isStreamingMode,
			String databaseName,
			String catalogName,
			CatalogManager catalogManager,
			TableConfig tableConfig);

}