public static List<DataFile> partitionDataFiles(Table table, Map<String, Object> partitionValues)
            throws IOException {
        table.refresh();
        Types.StructType partitionType = table.spec().partitionType();

        Record partitionRecord = GenericRecord.create(partitionType).copy(partitionValues);
        StructLikeWrapper expectedWrapper =
                StructLikeWrapper.forType(partitionType).set(partitionRecord);

        List<DataFile> dataFiles = Lists.newArrayList();
        try (CloseableIterable<FileScanTask> fileScanTasks = table.newScan().planFiles()) {
            for (FileScanTask scanTask : fileScanTasks) {
                StructLikeWrapper wrapper =
                        StructLikeWrapper.forType(partitionType).set(scanTask.file().partition());

                if (expectedWrapper.equals(wrapper)) {
                    dataFiles.add(scanTask.file());
                }
            }
        }

        return dataFiles;
    }
Assert table contains the expected list of records after waiting up to {@code maxCheckCount}
with {@code checkInterval}
inlong-sort/sort-flink/sort-flink-v1.13/sort-connectors/iceberg/src/test/java/org/apache/inlong/sort/iceberg/sink/util/SimpleDataUtil.java