[HUDI-3022] Fix NPE for isDropPartition method (#4319)
* [HUDI-3022] Fix NPE for isDropPartition method
This commit is contained in:
@@ -169,11 +169,11 @@ public abstract class AbstractSyncHoodieClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (hoodieCommitMetadata.isPresent()
|
if (hoodieCommitMetadata.isPresent()
|
||||||
&& hoodieCommitMetadata.get().getOperationType().equals(WriteOperationType.DELETE_PARTITION)) {
|
&& WriteOperationType.DELETE_PARTITION.equals(hoodieCommitMetadata.get().getOperationType())) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new HoodieSyncException("Failed to read data schema", e);
|
throw new HoodieSyncException("Failed to get commit metadata", e);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user