diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/catalog/glue/GlueIcebergUtil.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/catalog/glue/GlueIcebergUtil.java index d5336b14cda9..b8988d3112d2 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/catalog/glue/GlueIcebergUtil.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/catalog/glue/GlueIcebergUtil.java @@ -123,7 +123,7 @@ private static Optional> glueColumns(TypeManager typeManager, Table glueTypeString.length() > GLUE_COLUMN_TYPE_LENGTH_LIMIT) { return Optional.empty(); } - String trinoTypeName = TypeConverter.toTrinoType(icebergColumn.type(), typeManager).getTypeId().getId(); + String trinoTypeId = TypeConverter.toTrinoType(icebergColumn.type(), typeManager).getTypeId().getId(); Column column = new Column() .withName(icebergColumn.name()) .withType(glueTypeString) @@ -133,12 +133,12 @@ private static Optional> glueColumns(TypeManager typeManager, Table if (icebergColumn.isRequired()) { parameters.put(COLUMN_TRINO_NOT_NULL_PROPERTY, "true"); } - if (firstColumn || !glueTypeString.equals(trinoTypeName)) { - if (trinoTypeName.length() > GLUE_COLUMN_PARAMETER_LENGTH_LIMIT) { + if (firstColumn || !glueTypeString.equals(trinoTypeId)) { + if (trinoTypeId.length() > GLUE_COLUMN_PARAMETER_LENGTH_LIMIT) { return Optional.empty(); } // Store type parameter for some (first) column so that we can later detect whether column parameters weren't erased by something. - parameters.put(COLUMN_TRINO_TYPE_ID_PROPERTY, trinoTypeName); + parameters.put(COLUMN_TRINO_TYPE_ID_PROPERTY, trinoTypeId); } column.setParameters(parameters.buildOrThrow()); glueColumns.add(column); diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/catalog/glue/TrinoGlueCatalog.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/catalog/glue/TrinoGlueCatalog.java index 262f9320684d..2f90173d67c5 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/catalog/glue/TrinoGlueCatalog.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/catalog/glue/TrinoGlueCatalog.java @@ -431,9 +431,9 @@ private Optional> getColumnMetadata(SchemaTableName tableNa ImmutableList.Builder columns = ImmutableList.builderWithExpectedSize(glueColumns.size()); for (Column glueColumn : glueColumns) { Map columnParameters = getColumnParameters(glueColumn); - String trinoTypeName = columnParameters.getOrDefault(COLUMN_TRINO_TYPE_ID_PROPERTY, glueColumn.getType()); + String trinoTypeId = columnParameters.getOrDefault(COLUMN_TRINO_TYPE_ID_PROPERTY, glueColumn.getType()); boolean notNull = parseBoolean(columnParameters.getOrDefault(COLUMN_TRINO_NOT_NULL_PROPERTY, "false")); - Type type = typeManager.getType(TypeId.of(trinoTypeName)); + Type type = typeManager.getType(TypeId.of(trinoTypeId)); columns.add(ColumnMetadata.builder() .setName(glueColumn.getName()) .setType(type)