@Override
    public LinkedHashMap<String, String> generatePartValues(Row in) throws Exception {
        LinkedHashMap<String, String> partSpec = new LinkedHashMap<>();

        for (int i = 0; i < partitionIndexes.length; i++) {
            int index = partitionIndexes[i];
            Object field = in.getField(index);
            String partitionValue = field != null ? field.toString() : null;
            if (partitionValue == null || "".equals(partitionValue)) {
                partitionValue = defaultPartValue;
            }
            partSpec.put(partitionColumns[i], partitionValue);
        }
        return partSpec;
    }
@Test
    void testComputePartition() throws Exception {
        RowPartitionComputer computer =
                new RowPartitionComputer(
                        "myDefaultname",
                        new String[] {"f1", "p1", "p2", "f2"},
                        new String[] {"p1", "p2"});
        assertThat(generatePartitionPath(computer.generatePartValues(Row.of(1, 2, 3, 4))))
                .isEqualTo("p1=2/p2=3/");
        assertThat(generatePartitionPath(computer.generatePartValues(Row.of(1, null, 3, 4))))
                .isEqualTo("p1=myDefaultname/p2=3/");
    }