diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/ParquetTypeUtils.java b/lib/trino-parquet/src/main/java/io/trino/parquet/ParquetTypeUtils.java index 7312f694ac02..4797f6526a92 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/ParquetTypeUtils.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/ParquetTypeUtils.java @@ -44,8 +44,6 @@ import static com.google.common.base.Preconditions.checkArgument; import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; import static java.lang.String.format; -import static org.apache.parquet.io.ColumnIOUtil.columnDefinitionLevel; -import static org.apache.parquet.io.ColumnIOUtil.columnRepetitionLevel; import static org.apache.parquet.schema.Type.Repetition.OPTIONAL; import static org.apache.parquet.schema.Type.Repetition.REPEATED; @@ -327,8 +325,8 @@ public static Optional constructField(Type type, ColumnIO columnIO) return Optional.empty(); } boolean required = columnIO.getType().getRepetition() != OPTIONAL; - int repetitionLevel = columnRepetitionLevel(columnIO); - int definitionLevel = columnDefinitionLevel(columnIO); + int repetitionLevel = columnIO.getRepetitionLevel(); + int definitionLevel = columnIO.getDefinitionLevel(); if (type instanceof RowType rowType) { GroupColumnIO groupColumnIO = (GroupColumnIO) columnIO; ImmutableList.Builder> fieldsBuilder = ImmutableList.builder(); diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergParquetColumnIOConverter.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergParquetColumnIOConverter.java index fb73dbbd5590..e4b8356a5dfb 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergParquetColumnIOConverter.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergParquetColumnIOConverter.java @@ -35,8 +35,6 @@ import static io.trino.parquet.ParquetTypeUtils.getMapKeyValueColumn; import static io.trino.parquet.ParquetTypeUtils.lookupColumnById; import static java.util.Objects.requireNonNull; -import static org.apache.parquet.io.ColumnIOUtil.columnDefinitionLevel; -import static org.apache.parquet.io.ColumnIOUtil.columnRepetitionLevel; import static org.apache.parquet.schema.Type.Repetition.OPTIONAL; public final class IcebergParquetColumnIOConverter @@ -50,8 +48,8 @@ public static Optional constructField(FieldContext context, ColumnIO colu return Optional.empty(); } boolean required = columnIO.getType().getRepetition() != OPTIONAL; - int repetitionLevel = columnRepetitionLevel(columnIO); - int definitionLevel = columnDefinitionLevel(columnIO); + int repetitionLevel = columnIO.getRepetitionLevel(); + int definitionLevel = columnIO.getDefinitionLevel(); Type type = context.getType(); if (type instanceof RowType rowType) { List subColumns = context.getColumnIdentity().getChildren();