hililiwei commented on code in PR #6005:
URL: https://github.com/apache/iceberg/pull/6005#discussion_r997934218
##########
core/src/main/java/org/apache/iceberg/util/SnapshotUtil.java:
##########
@@ -72,7 +72,7 @@ public static boolean isAncestorOf(Table table, long
ancestorSnapshotId) {
public static boolean isParentAncestorOf(
Table table, long snapshotId, long ancestorParentSnapshotId) {
for (Snapshot snapshot : ancestorsOf(snapshotId, table::snapshot)) {
- if (snapshot.parentId() == ancestorParentSnapshotId) {
+ if (snapshot.parentId() != null && snapshot.parentId() ==
ancestorParentSnapshotId) {
Review Comment:
SnapshotUtil doesn't have a test case class for it. So I created one, adding
some additional test cases.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]