Skip to content
Permalink
Browse files
[MINOR] Fix a NPE for Option (#5461)
  • Loading branch information
xccui committed May 13, 2022
1 parent 701f8c0 commit 8ad0bb97453ee2d625cf2b41374d781d186aef5d
Showing 1 changed file with 1 addition and 1 deletion.
@@ -394,7 +394,7 @@ public void createDatabase(String databaseName) {
public Option<String> getLastCommitTimeSynced(String tableName) {
try {
Table table = getTable(awsGlue, databaseName, tableName);
return Option.of(table.getParameters().getOrDefault(HOODIE_LAST_COMMIT_TIME_SYNC, null));
return Option.ofNullable(table.getParameters().get(HOODIE_LAST_COMMIT_TIME_SYNC));
} catch (Exception e) {
throw new HoodieGlueSyncException("Fail to get last sync commit time for " + tableId(databaseName, tableName), e);
}

0 comments on commit 8ad0bb9

Please sign in to comment.