Commit 58866e1
Fix DuckDB bulk_insert failing when quoted CSV cells fall outside sniffer sample (#64)
* Fix DuckDB bulk_insert failing when quoted CSV cells fall outside sniffer sample (#62)
DuckDB's read_csv sniffer only examines the first ~20 480 rows; if none are
quoted, it sets quote=(empty) and then errors on any later quoted cell with a
column-count mismatch. Passing quote='"' explicitly bypasses auto-detection.
Adds a regression test that inserts 25 000 plain rows followed by one row
whose value contains a comma (triggering csv.writer quoting).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Bump version to 0.13.3
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Add explicit escape='\"' to read_csv alongside quote='\"'
Makes the RFC 4180 doubling behaviour explicit rather than relying on
DuckDB defaulting escape to the same char as quote.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent a8c5471 commit 58866e1
3 files changed
Lines changed: 23 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | | - | |
| 161 | + | |
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
171 | 192 | | |
172 | 193 | | |
173 | 194 | | |
| |||
0 commit comments