Repository navigation
Immutable
release. Only release title and notes can be modified.
Fixed
- A JSONL reader that fails in the middle of a line is reported as the failure it is.
Openjudged the bytes read before the failure as a line, so a pipe closed with an error, a network body that was reset or a gzip stream cut short returnedErrInvalidData("invalid JSON on line N") anderrors.Is(err, cause)was false; the error now wraps the reader's own error underErrParsing, as CSV, TSV, LTSV and JSON already did. A last line without a trailing newline still loads. (#1235) - A TSV reader that fails in the middle of a line is reported as the failure it is. The line scanner hands the bytes after the last newline back as a final line both when the source ends and when it fails, so the partial line reached the column check as a short row, and
OpenreturnedErrColumnMismatch("row N has 1 fields, want 2") instead of the reader's error. A source that fails is now told apart from one that ends, and its error is returned underErrParsingbefore any of the cut line is handed out. A last line without a trailing newline still loads, andBenchmarkOpenTSVReader(100,000 rows from a reader, added with this fix) is unchanged. (#1237)
Changed
- Tests pin what
AddReadercallers rely on: a reader that fails part way through returns its own error fromOpenfor every text format, plain, gzip-compressed and cut at every byte of the input; anio.Pipefilled by another goroutine in small writes loads every row across chunks; configuring a builder never fails, and each mistake (no input, a nil reader, a reader without a table name, an unknownFileType, a repeated table name, a missing path) surfaces fromOpenas the matching sentinel error; an empty TSV field in a text column loads as'', not NULL. - New godoc examples show a join on column names that hold spaces, a headerless file given its header with
io.MultiReader, and comment lines dropped through anio.Pipebefore the data reachesAddReader. - Mutation testing runs gomagi instead of gremlins. A pull request still mutates the lines it changes and fails below 90%; the weekly run mutates the whole module in one job and fails below 86%, in place of one job and floor per package.