diff --git a/integration-test/src/test/java/com/datastrato/gravitino/integration/test/trino/TrinoConnectorIT.java b/integration-test/src/test/java/com/datastrato/gravitino/integration/test/trino/TrinoConnectorIT.java index 967d199e77d..95a09c85ac8 100644 --- a/integration-test/src/test/java/com/datastrato/gravitino/integration/test/trino/TrinoConnectorIT.java +++ b/integration-test/src/test/java/com/datastrato/gravitino/integration/test/trino/TrinoConnectorIT.java @@ -505,7 +505,7 @@ private ColumnDTO[] createIcebergFullTypeColumns() { ColumnDTO[] columnDTO = createFullTypeColumns(); Set unsupportedType = - Sets.newHashSet("ByteType", "ShortType", "VarCharType", "FixedCharType", "FixedType"); + Sets.newHashSet("ByteType", "ShortType", "VarCharType", "FixedCharType"); return Arrays.stream(columnDTO) .filter(c -> !unsupportedType.contains(c.name())) .toArray(ColumnDTO[]::new); diff --git a/trino-connector/src/main/java/com/datastrato/gravitino/trino/connector/catalog/hive/HiveDataTypeTransformer.java b/trino-connector/src/main/java/com/datastrato/gravitino/trino/connector/catalog/hive/HiveDataTypeTransformer.java index 701d9adcb21..18d5c07ac89 100644 --- a/trino-connector/src/main/java/com/datastrato/gravitino/trino/connector/catalog/hive/HiveDataTypeTransformer.java +++ b/trino-connector/src/main/java/com/datastrato/gravitino/trino/connector/catalog/hive/HiveDataTypeTransformer.java @@ -12,7 +12,7 @@ /** Type transformer between Hive and Trino */ public class HiveDataTypeTransformer extends GeneralDataTypeTransformer { - // Hive varchar max length of 65535 + // Max length of Hive varchar is 65535 private static final int HIVE_VARCHAR_MAX_LENGTH = 65535; @Override diff --git a/trino-connector/src/main/java/com/datastrato/gravitino/trino/connector/catalog/iceberg/IcebergDataTypeTransformer.java b/trino-connector/src/main/java/com/datastrato/gravitino/trino/connector/catalog/iceberg/IcebergDataTypeTransformer.java index a7633b22c6e..f6f815cda98 100644 --- a/trino-connector/src/main/java/com/datastrato/gravitino/trino/connector/catalog/iceberg/IcebergDataTypeTransformer.java +++ b/trino-connector/src/main/java/com/datastrato/gravitino/trino/connector/catalog/iceberg/IcebergDataTypeTransformer.java @@ -9,6 +9,7 @@ import com.datastrato.gravitino.rel.types.Type.Name; import com.datastrato.gravitino.rel.types.Types; import com.datastrato.gravitino.trino.connector.util.GeneralDataTypeTransformer; +import io.trino.spi.type.VarbinaryType; /** Type transformer between Iceberg and Trino */ public class IcebergDataTypeTransformer extends GeneralDataTypeTransformer { @@ -21,4 +22,12 @@ public Type getGravitinoType(io.trino.spi.type.Type type) { } return gravitinoType; } + + @Override + public io.trino.spi.type.Type getTrinoType(Type type) { + if (Name.FIXED == type.name()) { + return VarbinaryType.VARBINARY; + } + return super.getTrinoType(type); + } }