deniskuzZ commented on code in PR #12137:
URL: https://github.com/apache/iceberg/pull/12137#discussion_r1955044758


##########
core/src/test/java/org/apache/iceberg/TestPartitionStatsUtil.java:
##########
@@ -370,16 +371,167 @@ public void testPartitionStatsWithSchemaEvolution() 
throws Exception {
             snapshot2.snapshotId()));
   }
 
-  private static PartitionData partitionData(Types.StructType partitionType, 
String c2, String c3) {
-    PartitionData partitionData = new PartitionData(partitionType);
-    partitionData.set(0, c2);
-    partitionData.set(1, c3);
-    return partitionData;
+  @org.junit.Test

Review Comment:
   thanks @ajantha-bhat for checking the PR, I almost gave up expecting an 
answer :)
   1. removed the wrong test annotation
   2. I understood the intention, however, there is a bug with the key 
matching: PartitionMap is initialized with individual partition specs [], but 
the supplied key is a unified tuple.
   
   For the created test case, the existing code returns just 3 partition values 
instead of 6. The test simulates partition evolution by changing the number of 
buckets from 2 to 4: `spec(c2, bucket(c1, 2)) -> spec(c2, bucket(c1, 4))`
   ````
   [foo, 0, null]
   [foo, 1, null]
   [bar, null, 0]
   ````



-- 
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

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

Reply via email to