Skip to content

fix: stop CSV header scanning at end of input - #142

Open
Shubham-Padkonde wants to merge 1 commit into
google:masterfrom
Shubham-Padkonde:fix/empty-csv-input
Open

Shubham-Padkonde wants to merge 1 commit into
google:masterfrom
Shubham-Padkonde:fix/empty-csv-input

Conversation

@Shubham-Padkonde

Copy link
Copy Markdown

CsvToTable repeatedly calls readline() while looking for a nonempty header, but never detects EOF. Empty, blank-only, and comment-only input therefore hangs indefinitely.

Return an empty reset table when EOF arrives before a header. Nonempty CSV parsing is unchanged. Regression coverage includes both text and byte streams and reusing a previously populated table.

Validation: the old implementation was terminated after a one-second subprocess timeout on empty input. All 102 tests pass after the fix, including six empty-input subcases; git diff --check passes. Existing regex FutureWarnings remain unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant