pvary commented on code in PR #10823:
URL: https://github.com/apache/iceberg/pull/10823#discussion_r1699565880


##########
flink/v1.19/flink/src/test/java/org/apache/iceberg/flink/sink/shuffle/TestSketchUtil.java:
##########
@@ -130,4 +133,111 @@ public void testRangeBoundsSkipDuplicates() {
         // skipped duplicate c's
         .containsExactly(CHAR_KEYS.get("c"), CHAR_KEYS.get("g"), 
CHAR_KEYS.get("j"));
   }
+
+  @ParameterizedTest
+  @ValueSource(ints = {4, 6})
+  public void testPartitioningAndScaleUp(int numPartitions) {
+    // calculated based on 4 partitions
+    SortKey[] rangeBounds =
+        new SortKey[] {CHAR_KEYS.get("c"), CHAR_KEYS.get("j"), 
CHAR_KEYS.get("m")};
+
+    // <= c
+    assertThat(

Review Comment:
   Maybe a method like this would help to focus on the actual test and hide the 
common parameters?
   ```
   private static assertPartition(SortKey key, int expected) {
      assertThat(
               SketchUtil.partition(
                   key, numPartitions, rangeBounds, SORT_ORDER_COMPARTOR))
           .isEqualTo(expected);
   }
   ```
   
   The first 8 assertions seems like the same to me, but it is hard to 
check/understand as it is "hidden" by the long assertion statements.
   
   WDYT?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to