zhangbutao opened a new issue, #8951: URL: https://github.com/apache/iceberg/issues/8951
### Apache Iceberg version 1.4.1 (latest release) ### Query engine Spark ### Please describe the bug 🐞 - I write a UT in `org.apache.iceberg.spark.extensions.TestMetadataTables.java`, in 1.3.1, it returns one partition, but returns two partitions. I have found this problem caused by this commit https://github.com/apache/iceberg/pull/7581. I am not sure which result is right. Could you please give some thought? @dramaticlly @szehon-ho @ajantha-bhat ``` @Test public void testPartitionsTableDeleteDatafile() throws NoSuchTableException, ParseException { sql( "CREATE TABLE %s (id bigint, data string) " + "USING iceberg " + "PARTITIONED BY (data) " + "TBLPROPERTIES" + "('format-version'='2', 'write.delete.mode'='merge-on-read')", tableName); List<SimpleRecord> recordsA = Lists.newArrayList(new SimpleRecord(1, "a"), new SimpleRecord(2, "a")); spark .createDataset(recordsA, Encoders.bean(SimpleRecord.class)) .coalesce(1) .writeTo(tableName) .append(); List<SimpleRecord> recordsB = Lists.newArrayList(new SimpleRecord(1, "b"), new SimpleRecord(2, "b")); spark .createDataset(recordsB, Encoders.bean(SimpleRecord.class)) .coalesce(1) .writeTo(tableName) .append(); Table table = Spark3Util.loadIcebergTable(spark, tableName); // here delete a partition data Expression finalExp = Expressions.in("data", "a"); DeleteFiles delete = table.newDelete(); delete.deleteFromRowFilter(finalExp); delete.commit(); List<Row> actualPartitions = spark.sql("SELECT * FROM " + tableName + ".partitions ").collectAsList(); Assert.assertEquals( "Partitions size returns one in 1.3.1, but returns two in 1.4.1", 2, actualPartitions.size()); } ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org