fix: preserve row_number columns in CSVToDocument - #12788
Merged
Merged
Conversation
Contributor
|
@LimbC-C is attempting to deploy a commit to the deepset Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||
anakin87
approved these changes
Oct 2, 2026
anakin87
left a comment
Member
There was a problem hiding this comment.
I pushed a few simplifications.
Looks good!
anakin87
enabled auto-merge (squash)
October 2, 2026 13:20
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.
Related Issues
Fixes #12787.
Proposed Changes:
Preserve a CSV column named
row_numberinCSVToDocumentrow mode. Previously the generated row index overwrote that column after metadata collision handling, silently losing source record identifiers.Reserve
row_numberbefore merging CSV columns so the existingcsv_prefix and numeric suffix handling preserves the original value. Add regressions for ordinary and occupied-prefix metadata, plus a control selectingrow_numberas the content column. Update the component docstring, current/versioned docs, and release note.How did you test it?
test/components/converters/test_csv_to_document.pypass; CSV converter statement coverage is 95%.git diff --cached --checkpass.Validation ran via Hatch on Windows / Python 3.12.14 using local ByteStreams. Pytest emitted two NumPy-reload warnings from Haystack imports. No live model, external service, or full integration suite was run.
Notes for the reviewer
Generated, reviewed by the coding agent, and tested with Codex at the account owner's request. No human review is claimed.
The change is independent of #12772, which fixes textual NA markers in CSVDocumentCleaner. The converter, its tests, and contribution guidelines were unchanged between the local base and current upstream at verification.
Checklist