[HUDI-400] Check upgrade from old plan to new plan for compaction (#1422)
* Fix NPE when DataFile is null * Check from old plan upgrade to new plan
This commit is contained in:
@@ -55,7 +55,7 @@ public class CompactionV2MigrationHandler extends AbstractMigratorBase<HoodieCom
|
||||
v2CompactionOperationList = input.getOperations().stream().map(inp ->
|
||||
HoodieCompactionOperation.newBuilder().setBaseInstantTime(inp.getBaseInstantTime())
|
||||
.setFileId(inp.getFileId()).setPartitionPath(inp.getPartitionPath()).setMetrics(inp.getMetrics())
|
||||
.setDataFilePath(new Path(inp.getDataFilePath()).getName()).setDeltaFilePaths(
|
||||
.setDataFilePath(inp.getDataFilePath() == null ? null : new Path(inp.getDataFilePath()).getName()).setDeltaFilePaths(
|
||||
inp.getDeltaFilePaths().stream().map(s -> new Path(s).getName()).collect(Collectors.toList()))
|
||||
.build()).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user