diff --git a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/BaseIcebergConnectorSmokeTest.java b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/BaseIcebergConnectorSmokeTest.java index aa9316dd9b55..b55d40cbafb8 100644 --- a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/BaseIcebergConnectorSmokeTest.java +++ b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/BaseIcebergConnectorSmokeTest.java @@ -547,7 +547,7 @@ public void testSortedTableUsingNestedField() 500); for (Object filePath : computeActual("SELECT file_path from \"" + table.getName() + "$files\"").getOnlyColumnAsSet()) { - assertThat(isFileSorted(Location.of((String) filePath), "name")).isTrue(); + assertThat(isFileSorted(Location.of((String) filePath), "row_t.name")).isTrue(); } assertQuery("SELECT * FROM " + table.getName(), "SELECT * FROM " + table.getName() + " ORDER BY id"); } diff --git a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/IcebergTestUtils.java b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/IcebergTestUtils.java index a0955ebad79e..b640363baec3 100644 --- a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/IcebergTestUtils.java +++ b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/IcebergTestUtils.java @@ -53,7 +53,6 @@ import static com.google.common.base.Verify.verify; import static com.google.common.collect.ImmutableList.toImmutableList; -import static com.google.common.collect.Iterators.getOnlyElement; import static com.google.common.collect.MoreCollectors.onlyElement; import static io.trino.plugin.hive.metastore.cache.CachingHiveMetastore.createPerTransactionCache; import static io.trino.plugin.iceberg.IcebergQueryRunner.ICEBERG_CATALOG; @@ -141,7 +140,7 @@ public static boolean checkParquetFileSorting(TrinoInputFile inputFile, String s verify(parquetMetadata.getBlocks().size() > 1, "Test must produce at least two row groups"); for (BlockMetadata blockMetaData : parquetMetadata.getBlocks()) { ColumnChunkMetadata columnMetadata = blockMetaData.columns().stream() - .filter(column -> getOnlyElement(column.getPath().iterator()).equalsIgnoreCase(sortColumnName)) + .filter(column -> column.getPath().toDotString().equalsIgnoreCase(sortColumnName)) .collect(onlyElement()); if (previousMax != null) { if (previousMax.compareTo(columnMetadata.getStatistics().genericGetMin()) > 0) {