rdblue commented on a change in pull request #543: Avoid NullPointerException in FindFiles when there is no snapshot URL: https://github.com/apache/incubator-iceberg/pull/543#discussion_r334695464
########## File path: core/src/main/java/org/apache/iceberg/FindFiles.java ########## @@ -191,7 +192,10 @@ public Builder inPartitions(PartitionSpec spec, List<StructLike> partitions) { Snapshot snapshot = snapshotId != null ? ops.current().snapshot(snapshotId) : ops.current().currentSnapshot(); - CloseableIterable<ManifestEntry> entries = new ManifestGroup(ops, snapshot.manifests()) + // snapshot could be null when the table just gets created + Iterable<ManifestFile> manifests = (snapshot != null) ? snapshot.manifests() : new HashSet<>(0); Review comment: If the snapshot is null, why not return `CloseableIterable.empty`? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org