public void reset() {
            this.records.clear();
            this.detector.reset();
        }
Sets up before flush: patch up the first record with correct partition path and fileID.

<p>Note: the method may modify the given records {@code records}.
inlong-sort/sort-flink/sort-flink-v1.15/sort-connectors/hudi/src/main/java/org/apache/inlong/sort/hudi/sink/StreamWriteFunction.java