Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ public IcebergMetadataCache(ExecutorService executor) {

public List<Snapshot> getSnapshotList(TIcebergMetadataParams params) throws UserException {
CatalogIf catalog = Env.getCurrentEnv().getCatalogMgr().getCatalog(params.getCatalog());
if (catalog == null) {
throw new UserException("The specified catalog does not exist:" + params.getCatalog());
}
IcebergMetadataCacheKey key =
IcebergMetadataCacheKey.of(catalog, params.getDatabase(), params.getTable());
return snapshotListCache.get(key);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2153,15 +2153,20 @@ public TFrontendPingFrontendResult ping(TFrontendPingFrontendRequest request) th

@Override
public TFetchSchemaTableDataResult fetchSchemaTableData(TFetchSchemaTableDataRequest request) throws TException {
if (!request.isSetSchemaTableName()) {
return MetadataGenerator.errorResult("Fetch schema table name is not set");
}
// tvf queries
if (request.getSchemaTableName() == TSchemaTableName.METADATA_TABLE) {
return MetadataGenerator.getMetadataTable(request);
} else {
// database information_schema's tables
return MetadataGenerator.getSchemaTableData(request);
try {
if (!request.isSetSchemaTableName()) {
return MetadataGenerator.errorResult("Fetch schema table name is not set");
}
// tvf queries
if (request.getSchemaTableName() == TSchemaTableName.METADATA_TABLE) {
return MetadataGenerator.getMetadataTable(request);
} else {
// database information_schema's tables
return MetadataGenerator.getSchemaTableData(request);
}
} catch (Exception e) {
LOG.warn("Failed to fetchSchemaTableData", e);
return MetadataGenerator.errorResult(e.getMessage());
}
}

Expand Down