Skip to content

Commit

Permalink
[BugFix] Fix NullPointerException in mv update meta for iceberg catal…
Browse files Browse the repository at this point in the history
…og (#46155)

Signed-off-by: shuming.li <[email protected]>
  • Loading branch information
LiShuMing authored May 29, 2024
1 parent 5967988 commit b0e3982
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,13 @@ public List<PartitionInfo> getPartitions(Table table, List<String> partitionName
CloseableIterable<StructLike> rows = task.asDataTask().rows();
for (StructLike row : rows) {
// Get the last updated time of the table according to the table schema
long lastUpdated = row.get(7, Long.class);
long lastUpdated = -1;
try {
lastUpdated = row.get(7, Long.class);
} catch (NullPointerException e) {
LOG.error("The table [{}] snapshot [{}] has been expired",
icebergTable.getRemoteDbName(), icebergTable.getRemoteTableName(), e);
}
Partition partition = new Partition(lastUpdated);
return ImmutableList.of(partition);
}
Expand Down

0 comments on commit b0e3982

Please sign in to comment.