@SuppressWarnings("rawtypes")
    private boolean hasRecords() {
        if (batchMap.isEmpty()) {
            return false;
        }
        boolean hasRecords = false;
        for (List value : batchMap.values()) {
            if (!value.isEmpty()) {
                hasRecords = true;
                break;
            }
        }
        return hasRecords;
    }
format data to csv or json

@param values
@param format
@return string
@throws JsonProcessingException
inlong-sort/sort-flink/sort-flink-v1.13/sort-connectors/doris/src/main/java/org/apache/inlong/sort/doris/table/DorisDynamicSchemaOutputFormat.java