diff --git a/catalogs/catalog-jdbc-common/src/main/java/com/datastrato/gravitino/catalog/jdbc/JdbcColumn.java b/catalogs/catalog-jdbc-common/src/main/java/com/datastrato/gravitino/catalog/jdbc/JdbcColumn.java index 5904f7fcfc5..0829c2d0bdc 100644 --- a/catalogs/catalog-jdbc-common/src/main/java/com/datastrato/gravitino/catalog/jdbc/JdbcColumn.java +++ b/catalogs/catalog-jdbc-common/src/main/java/com/datastrato/gravitino/catalog/jdbc/JdbcColumn.java @@ -5,8 +5,10 @@ package com.datastrato.gravitino.catalog.jdbc; import com.datastrato.gravitino.catalog.rel.BaseColumn; +import lombok.EqualsAndHashCode; /** Represents a column in the Jdbc column. */ +@EqualsAndHashCode(callSuper = true) public class JdbcColumn extends BaseColumn { private JdbcColumn() {} diff --git a/catalogs/catalog-lakehouse-iceberg/src/main/java/com/datastrato/gravitino/catalog/lakehouse/iceberg/IcebergColumn.java b/catalogs/catalog-lakehouse-iceberg/src/main/java/com/datastrato/gravitino/catalog/lakehouse/iceberg/IcebergColumn.java index 48d3dda19e8..3195ef82721 100644 --- a/catalogs/catalog-lakehouse-iceberg/src/main/java/com/datastrato/gravitino/catalog/lakehouse/iceberg/IcebergColumn.java +++ b/catalogs/catalog-lakehouse-iceberg/src/main/java/com/datastrato/gravitino/catalog/lakehouse/iceberg/IcebergColumn.java @@ -5,29 +5,17 @@ package com.datastrato.gravitino.catalog.lakehouse.iceberg; import com.datastrato.gravitino.catalog.rel.BaseColumn; +import lombok.EqualsAndHashCode; /** Represents a column in the Iceberg column. */ +@EqualsAndHashCode(callSuper = true) public class IcebergColumn extends BaseColumn { - private int id; - private IcebergColumn() {} - public int getId() { - return id; - } - /** A builder class for constructing IcebergColumn instances. */ public static class Builder extends BaseColumnBuilder { - /** The ID of this field. */ - private int id; - - public Builder withId(int id) { - this.id = id; - return this; - } - /** * Internal method to build a IcebergColumn instance using the provided values. * @@ -36,7 +24,6 @@ public Builder withId(int id) { @Override protected IcebergColumn internalBuild() { IcebergColumn icebergColumn = new IcebergColumn(); - icebergColumn.id = id; icebergColumn.name = name; icebergColumn.comment = comment; icebergColumn.dataType = dataType; diff --git a/catalogs/catalog-lakehouse-iceberg/src/main/java/com/datastrato/gravitino/catalog/lakehouse/iceberg/converter/ConvertUtil.java b/catalogs/catalog-lakehouse-iceberg/src/main/java/com/datastrato/gravitino/catalog/lakehouse/iceberg/converter/ConvertUtil.java index 741a413a135..356ad5e119d 100644 --- a/catalogs/catalog-lakehouse-iceberg/src/main/java/com/datastrato/gravitino/catalog/lakehouse/iceberg/converter/ConvertUtil.java +++ b/catalogs/catalog-lakehouse-iceberg/src/main/java/com/datastrato/gravitino/catalog/lakehouse/iceberg/converter/ConvertUtil.java @@ -58,7 +58,6 @@ public static com.datastrato.gravitino.rel.types.Type formIcebergType(Type type) */ public static IcebergColumn fromNestedField(Types.NestedField nestedField) { return new IcebergColumn.Builder() - .withId(nestedField.fieldId()) .withName(nestedField.name()) .withNullable(nestedField.isOptional()) .withComment(nestedField.doc())