CSV reader/writer edge-case fixes and COPY option expansion #54
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/csv-scanner-opts"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
CSV reader/writer edge cases + COPY option expansion
Implements the audit-fix phase of the CSV/COPY packet (
astra-complete.md7.2) against vendored upstream semantics (pinned duckdb @117e1a46:csv_writer.cpp,copy_csv.cpp,test/sql/copy/csv/).Reader (
lib/jerboa/duckdb/csv.ss)allow-quoted-nulls?,skip(drops leading records before header consumption).Writer
CSVWriter::RequiresQuotes), so empty string vs SQL NULL stays distinguishable:NULLwrites the bare marker,""writes quoted.COPY (parser + api)
COPY ... TOreturns a Count result row (was empty result).COPY ... TOwrites the header by default unlessHEADER FALSEis explicit (upstream csv_writer.cpp:89);COPY ... FROMunchanged (header off by default) via a header-mode tri-state on the AST.SKIP n,ALLOW_QUOTED_NULLS true|false,SEP/SEPARATORaliases forDELIMITER.Tests
test/unit/csv.ss: EOF null, quoted-empty-at-EOF, empty-line skip, relaxed quotes, allow_quoted_nulls matrix, skip, null-vs-empty write bytes, COPY TO Count + header default + round-trip.test/unit/engine.ss: updated for Count result and header-on default.Verification
make build;make unitx3;make verify(contracts-check, diff, bench, sqllogic 664, sqllogic-upstream 62, sqllogic-events(+failure-check), concurrency-stress, native-race-check, check-docs, binary);make security; compat smoke;git diff --check— all green.Version: 0.30.1
CI note: required-ci failures are the instance-wide freebsd-amd64 runner outage also affecting PR #40 and main dispatches (every ci.yaml run since ~12:10 dies in 2-4s; healthy runs take 3-5 min; see runs 208-227). This tree is fully green locally: build, unit x3, verify (incl. sqllogic 664 + upstream 62), security, compat smoke. Will merge once the runner recovers.