feat(write): TabularExport<T> — an export declared once with typed columns - #84
Merged
Merged
Conversation
… overload, a chunk selector
…om the import's fields
…or a plain sequence — flushed as it goes Also: Columns returns a read-only wrapper, so a caller cannot cast it back to an array and change the export.
… sheet faults the caller's writer; remove a stray backup file
… nothing per row, serves concurrent writes
…AnyInRange<char> boxed 96 bytes on every text cell
TextRules.Check ran on every text cell and called the generic
IndexOfAnyInRange('\uD800', '\uDFFF'), which allocates boxed chars on each
call: up to ~81 MB per million rows in the export test, in every format;
how much showed depended on tiered compilation, hence the varying failures.
A SearchValues over U+D800..U+DFFF finds the same surrogates with no
allocation. A million rows now allocate ~22 KB more than ten thousand
(per-chunk async state), in csv, xlsx and ods on net8.0 and net10.0.
… fails; reword the surrogate-check comment
…ns; rename the selector to itemsOf; name the real parameter for a null chunk; cover selector and cancellation failures
… document ArgumentException for a null chunk; spec states the measured per-cell cost
… one-off tiering allocation on Linux net10 failed the exact zero
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 4 of #67. Closes #73.
TabularExport.For<T>().Column(...).Build(): typed columns (text, integers, decimal, double, bool, DateTime, DateOnly, nullable), headers from typed import fields so an export maps back by header.IEnumerable<T>,IAsyncEnumerable<T>, chunks, or messages with a chunk selector (itemsOf) — e.g. a server stream of batches — flushing per chunk and when the buffer recommends it.SearchValues(the generic range search boxed 96 B per text cell at tier 0).TabularFile.Open→ import by header gives the same values.