Skip to content

Commit 6f334b1

Browse files
raunaqmorarkawendigo
authored andcommitted
Avoid null pointer exceptions from empty tables without snapshot
1 parent ba225ba commit 6f334b1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergMetadata.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3423,6 +3423,9 @@ else if (isMetadataColumnId(columnHandle.getId())) {
34233423

34243424
private static List<ManifestFile> loadAllManifestsFromSnapshot(Table icebergTable, Snapshot snapshot)
34253425
{
3426+
if (snapshot == null) {
3427+
return ImmutableList.of();
3428+
}
34263429
try {
34273430
return snapshot.allManifests(icebergTable.io());
34283431
}

0 commit comments

Comments
 (0)