This is an automated email from the ASF dual-hosted git repository.
nagarwal pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-hudi.git
The following commit(s) were added to refs/heads/master by this push:
new b95367d [HUDI-469] Fix: HoodieCommitMetadata only show first commit
insert rows.
b95367d is described below
commit b95367d82a4e0c31a526cf8b292388355847e274
Author: Thinking <[email protected]>
AuthorDate: Fri Jan 10 16:29:51 2020 +0800
[HUDI-469] Fix: HoodieCommitMetadata only show first commit insert rows.
---
.../main/java/org/apache/hudi/common/model/HoodieCommitMetadata.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
a/hudi-common/src/main/java/org/apache/hudi/common/model/HoodieCommitMetadata.java
b/hudi-common/src/main/java/org/apache/hudi/common/model/HoodieCommitMetadata.java
index 475f75c..fcca320 100644
---
a/hudi-common/src/main/java/org/apache/hudi/common/model/HoodieCommitMetadata.java
+++
b/hudi-common/src/main/java/org/apache/hudi/common/model/HoodieCommitMetadata.java
@@ -175,7 +175,8 @@ public class HoodieCommitMetadata implements Serializable {
long totalInsertRecordsWritten = 0;
for (List<HoodieWriteStat> stats : partitionToWriteStats.values()) {
for (HoodieWriteStat stat : stats) {
- if (stat.getPrevCommit() != null &&
stat.getPrevCommit().equalsIgnoreCase("null")) {
+ // determine insert rows in every file
+ if (stat.getPrevCommit() != null) {
totalInsertRecordsWritten += stat.getNumInserts();
}
}