voonhous commented on code in PR #17830:
URL: https://github.com/apache/hudi/pull/17830#discussion_r2692956636
##########
hudi-common/src/main/java/org/apache/hudi/common/model/CompactionOperation.java:
##########
@@ -140,36 +115,9 @@ public static CompactionOperation
convertFromAvroRecordInstance(HoodieCompaction
op.dataFileName = Option.ofNullable(operation.getDataFilePath());
op.dataFileCommitTime = op.dataFileName.map(p -> FSUtils.getCommitTime(new
StoragePath(p).getName()));
op.deltaFileNames = new ArrayList<>(operation.getDeltaFilePaths());
- op.id = new HoodieFileGroupId(operation.getPartitionPath(),
operation.getFileId());
+ op.fileGroupId = new HoodieFileGroupId(operation.getPartitionPath(),
operation.getFileId());
op.metrics = operation.getMetrics() == null ? new HashMap<>() : new
HashMap<>(operation.getMetrics());
op.bootstrapFilePath = Option.ofNullable(operation.getBootstrapFilePath());
return op;
}
-
- @Override
- public String toString() {
- return "CompactionOperation{baseInstantTime='" + baseInstantTime + '\'' +
", dataFileCommitTime="
- + dataFileCommitTime + ", deltaFileNames=" + deltaFileNames + ",
dataFileName=" + dataFileName + ", id='" + id
- + '\'' + ", metrics=" + metrics + ", bootstrapFilePath=" +
bootstrapFilePath + '}';
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- CompactionOperation operation = (CompactionOperation) o;
- return Objects.equals(baseInstantTime, operation.baseInstantTime)
- && Objects.equals(dataFileCommitTime, operation.dataFileCommitTime)
- && Objects.equals(deltaFileNames, operation.deltaFileNames)
- && Objects.equals(dataFileName, operation.dataFileName) &&
Objects.equals(id, operation.id);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(baseInstantTime, id);
Review Comment:
Seems to be a dev error from the getgo in the commit below way before Hudi
was opensourced.
Specifically:
https://github.com/apache/hudi/commit/64fec640975b42b0645c75416eb8bbf0b8092c66#diff-144d143726704055a5b8f62e80a881967611d9b0585cd268ec9ddc34add7d098R130-R161
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]