Repository navigation
feat: add reader-configured filtering and parsed-value reuse - #399
Merged
Merged
Conversation
Contributor
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Seddryck
force-pushed
the
feat/reader-filtering
branch
from
November 2, 2026 20:18
4823eef to
cf929f1
Compare
Seddryck
force-pushed
the
feat/reader-filtering
branch
from
November 2, 2026 20:28
cf929f1 to
e8c88e7
Compare
|
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.



Rows can now be filtered on the reader before object construction or output-row materialization. Add named/ordinal equality, sanitized-span, and typed cell conditions, plus read-only multi-field row predicates, through the shared sync/async pipeline for every supported format and CSV batches.
Typed conversions are cached lazily per current row, keyed by ordinal, result type, and effective parser. Filters, getters, and default CSV constructor projection reuse compatible conversions; explicit span-parser overrides remain independent. Document null/error/lifetime rules, source numbering, and allocation tradeoffs.
close #397
Validation:
dotnet build PocketCsvReader.full.sln --no-restore: passed on net8.0/net9.0/net10.0 (existing test nullable and Profiler dependency/entry-point warnings).dotnet format PocketCsvReader.full.sln analyzers --verify-no-changes --no-restore: passed via the pre-push hook.FullyQualifiedName~ReaderFilteringTest|FullyQualifiedName~SpanParser|FullyQualifiedName~SpanCustomParser|FullyQualifiedName~AsyncTypedRecordStreaming|FullyQualifiedName~CsvObjectReaderTest|FullyQualifiedName~RowNumberTest|FullyQualifiedName~ObjectArrayRowsTest|FullyQualifiedName~DynamicRowsTest|FullyQualifiedName~CsvBatchDataReaderTest|FullyQualifiedName~AsyncDataReaderTest|FullyQualifiedName~DefaultParserTests|FullyQualifiedName~CsvArrayStringTest(216/framework), followed by rerunningReaderFilteringTestafter adding the custom-mapper/legacy-array check (21/framework): passed.FullyQualifiedName~ReaderFilteringTest|FullyQualifiedName~ParsedRowsTest|FullyQualifiedName~RowShapeParserCachingTest|FullyQualifiedName~LazyJsonDecodingTests|FullyQualifiedName~SecurityLogReaderTests(1002 executions): passed. NDJSON filtering rerun after adding nullable stable-shape coverage (3/framework): passed.--reader-filtering-matrix: passed; 50,000 rows, span filtering 0.24 allocated bytes/source row versus 0.22 without filters. Typed filter/projection used 50,000 parser calls versus 100,000 manually, at 24.26 bytes/row from boxed values. For this cheap integer parser, cache overhead made the configured case slower (56.52 ms versus 37.84 ms); this is a smoke measurement, not a controlled throughput benchmark.Documentation alignment and rebase:
docs/_docs/reader-filtering.md, added it under Reading data, and linked it from profile, reader, output, validation, source-position, and batch guides.ReaderFilteringTestexecutions across seven projects on .NET 8/9/10. All passed.