@Override
  public int partition(RowData row, int numPartitions) {
    // reuse the sortKey and rowDataWrapper
    sortKey.wrap(rowDataWrapper.wrap(row));
    return SketchUtil.partition(sortKey, numPartitions, rangeBounds, comparator);
  }
@Test
  public void testRangePartitioningWithRangeBounds() {
    SketchRangePartitioner partitioner =
        new SketchRangePartitioner(TestFixtures.SCHEMA, SORT_ORDER, RANGE_BOUNDS);
    GenericRowData row =
        GenericRowData.of(StringData.fromString("data"), 0L, StringData.fromString("2023-06-20"));
    for (long id = 0; id < MAX_ID; ++id) {
      row.setField(1, id);
      int partition = partitioner.partition(row, NUM_PARTITIONS);
      assertThat(partition).isGreaterThanOrEqualTo(0).isLessThan(NUM_PARTITIONS);
      int expectedPartition = id == 0L ? 0 : (int) ((id - 1) / RANGE_STEP);
      assertThat(partition).isEqualTo(expectedPartition);
    }
  }