voonhous commented on code in PR #17655:
URL: https://github.com/apache/hudi/pull/17655#discussion_r2647363645


##########
hudi-common/src/main/java/org/apache/hudi/stats/HoodieColumnRangeMetadata.java:
##########
@@ -38,123 +41,31 @@
  *        associated with
  */
 @SuppressWarnings("rawtype")
+@Value
 public class HoodieColumnRangeMetadata<T extends Comparable> implements 
Serializable {
-  private final String filePath;
-  private final String columnName;
-  @Nullable
-  private final T minValue;
-  @Nullable
-  private final T maxValue;
-  private final long nullCount;
-  private final long valueCount;
-  private final long totalSize;
-  private final long totalUncompressedSize;
-  private final ValueMetadata valueMetadata;
-
-  private HoodieColumnRangeMetadata(String filePath,
-                                    String columnName,
-                                    @Nullable T minValue,
-                                    @Nullable T maxValue,
-                                    long nullCount,
-                                    long valueCount,
-                                    long totalSize,
-                                    long totalUncompressedSize,
-                                    ValueMetadata valueMetadata) {
-    this.filePath = filePath;
-    this.columnName = columnName;
-    this.minValue = minValue;
-    this.maxValue = maxValue;
-    this.nullCount = nullCount;
-    this.valueCount = valueCount;
-    this.totalSize = totalSize;
-    this.totalUncompressedSize = totalUncompressedSize;
-    this.valueMetadata = valueMetadata;
-  }
-
-  public String getFilePath() {
-    return this.filePath;
-  }
-
-  public String getColumnName() {
-    return this.columnName;
-  }
 
+  String filePath;
+  String columnName;
   @Nullable
-  public T getMinValue() {
-    return this.minValue;
-  }
+  T minValue;
+  @Nullable
+  T maxValue;
+  long nullCount;
+  long valueCount;
+  long totalSize;

Review Comment:
   Crux of the problem here is that `@EqualsAndHashCode` generates the `equals` 
and `hashcode` function overrides.
   
   So, they will utilise the same number of fields if we use the Lombok 
annotations. 
   
   So, we will be altering the logic for one of the overrides. We can't 
configure them separately. 
   
   Will you prefer if i leave the override for hashcode?



-- 
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]

Reply via email to