voonhous commented on code in PR #17655:
URL: https://github.com/apache/hudi/pull/17655#discussion_r2636886605
##########
hudi-common/src/main/java/org/apache/hudi/stats/HoodieColumnRangeMetadata.java:
##########
@@ -38,85 +40,29 @@
* 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;
+ long totalUncompressedSize;
+ ValueMetadata valueMetadata;
public Object getMinValueWrapped() {
return getValueMetadata().wrapValue(getMinValue());
}
- @Nullable
- public T getMaxValue() {
- return this.maxValue;
- }
-
public Object getMaxValueWrapped() {
return getValueMetadata().wrapValue(getMaxValue());
}
- public long getNullCount() {
- return nullCount;
- }
-
- public long getValueCount() {
- return valueCount;
- }
-
- public long getTotalSize() {
- return totalSize;
- }
-
- public long getTotalUncompressedSize() {
- return totalUncompressedSize;
- }
-
- public ValueMetadata getValueMetadata() {
- return valueMetadata;
- }
-
@Override
public boolean equals(final Object o) {
Review Comment:
Not removing the `equals`, `hashCode` and `toString` methods as the
overrides below ignore the `valueMetadata` field.
--
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]