VuMartin opened a new pull request, #8608: URL: https://github.com/apache/texera/pull/8608
### What changes were proposed in this PR? Fix schema inference for CSV and JSONL file-scan operators when `Limit = 0`. Previously, the scan limit was also used to determine how many rows were sampled for schema inference. When the limit was `0`, no rows were sampled, causing schema inference to produce an empty schema or, for the old CSV scanner, an `ArrayIndexOutOfBoundsException`. This change ensures schema inference samples at least one row when the scan limit is `0`, while the actual scan output remains limited to zero rows. Before: <img width="2128" height="1084" alt="image" src="https://github.com/user-attachments/assets/43683a51-ac04-491a-a439-b84fe5824bf2" /> After: <img width="2128" height="1084" alt="image" src="https://github.com/user-attachments/assets/4cec7603-0c0a-4ef3-ac69-ddcc7c5e946c" /> ### Any related issues, documentation, discussions? <!-- Add the issue number here if applicable. --> ### How was this PR tested? Added regression tests verifying that CSV, Parallel CSV, CSVOld, and JSONL file-scan operators still infer the expected columns when `Limit = 0`. The relevant test suites were run with `sbt testOnly`. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Sonnet 5) -- 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]
