Skip to content

Commit 13cb0b0

Browse files
committed
Optimised PostgresMetadataFetcher
1 parent b900749 commit 13cb0b0

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

document-store/src/main/java/org/hypertrace/core/documentstore/postgres/PostgresMetadataFetcher.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ public Map<String, PostgresColumnMetadata> fetch(String tableName) {
6262
isPrimaryKey));
6363
}
6464
}
65+
if (metadataMap.isEmpty()) {
66+
throw new RuntimeException(
67+
"No columns found for table: " + tableName + ". Table may not exist.");
68+
}
6569
return metadataMap;
6670
} catch (SQLException e) {
6771
throw new RuntimeException("Failed to fetch Postgres metadata for table: " + tableName, e);

0 commit comments

Comments
 (0)