Skip to content

Commit

Permalink
Review with Ryan
Browse files Browse the repository at this point in the history
  • Loading branch information
malhotrashivam committed Oct 25, 2024
1 parent b254ceb commit d2e1723
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,9 @@ private SpecAndSchema getSpecAndSchema(@NotNull final IcebergReadInstructions re
} else {
// Use the schema from the snapshot
snapshot = snapshotFromInstructions;
schema = schema(snapshot.schemaId()).get();
schema = schema(snapshot.schemaId()).orElseThrow(() -> new IllegalArgumentException(
"Schema with id " + snapshot.schemaId() + " not found for table " + tableIdentifier + ", snapshot "
+ snapshot.snapshotId()));
partitionSpec = table.spec();
updatedInstructions = readInstructions.withSnapshot(snapshot);
}
Expand Down

0 comments on commit d2e1723

Please sign in to comment.