SEZ9 commented on issue #12935: URL: https://github.com/apache/seatunnel/issues/12935#issuecomment-6331956471
Thanks for the detailed report and the minimal `/tmp/preamble.csv` reproducer. The ordering problem is plausible: with `enable_file_split=false`, `csv_use_header_line=true`, and a positive `skip_header_row_number`, constructing the header-aware CSV parser before skipping the physical preamble lines means the parser can consume and buffer input first, so the later `BufferedReader.readLine()` skip can hit EOF even though the file has enough lines, which matches the `File [preamble] has fewer lines than expected to skip.` error you posted. Skipping the preamble lines on the raw reader first and only then constructing the parser, as you propose in `CsvReadStrategy`, sounds like the right fix, as long as byte-range splits keep their existing no-re-skip behavior. Since #12936 is already open with the reader regression tests and LocalFile E2E coverage, let's continue the implementation and review discussion there. <!-- streview-comment:1945 --> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
