Skip to content

fix(csv): handle trailing empty field at EOF without newline in COPY FROM#648

Merged
adsharma merged 2 commits into
mainfrom
fix/csv-trailing-empty-field2
Jul 3, 2026
Merged

fix(csv): handle trailing empty field at EOF without newline in COPY FROM#648
adsharma merged 2 commits into
mainfrom
fix/csv-trailing-empty-field2

Conversation

@adsharma

@adsharma adsharma commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Details in #644

chiangchenghsin-hash and others added 2 commits July 3, 2026 09:43
When a CSV file ends with a row like "a,b," (no trailing newline, last
field empty), the parser dropped the empty field, causing "expected N
values per row, but got N-1". Add an else-if branch in final_state to
emit the empty value when column > 0.
@adsharma adsharma changed the title Fix/csv trailing empty field2 fix(csv): handle trailing empty field at EOF without newline in COPY FROM Jul 3, 2026
@adsharma adsharma merged commit 8cba3fe into main Jul 3, 2026
4 checks passed
@adsharma adsharma deleted the fix/csv-trailing-empty-field2 branch July 3, 2026 19:57
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.

2 participants