You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(data): count whitespace values read as null - #3205
A CSV cell containing only spaces could become null when its column was inferred as numeric, without a loss notice. The shared CSV and workbook table reader now counts those actual conversions and emits one DroppedValue notice with the affected count and column names.
Column inference and parsed values keep their existing behavior. Genuinely empty cells, explicit null markers and whitespace retained in text columns are excluded. XML readers normalize their text earlier and are outside this change. The shared reader reaches existing desktop, browser, CLI, Python and phone import paths without new commands or controls. Counts use field-sized metadata and add no layer copy.
Testing
The actual CSV-reader regression failed on the baseline because its whitespace-loss notice was absent.
The regression distinguishes four discarded whitespace values from empty cells, a null marker and a preserved text-space cell, and includes a clean control.
The focused regression and clean control passed after the fix. Independent review approved the change with no blocking findings. The full Linux fork gate passed on 562ff11c11.
No actionable comments were generated in the recent review.
Walkthrough
CSV import now reports whitespace-only values that become null in inferred non-text columns. The notice includes the total count and affected fields. Whitespace-only values retained as text are not included.
Changes: CSV whitespace-loss notices
Layer / File(s)
Summary
Count and report whitespace losses crates/data/src/io.rs
read_rows counts whitespace-only values that become null in non-text columns and emits one DroppedValue notice with the count and affected fields. Tests check text retention and that clean input produces no notice.
Tracking: findings from a real-data trial #1998: This PR addresses the tracked read-side case where whitespace-only values in non-text columns become null, but does not cover text-column or dBASE behavior.
Possibly related PRs
opengeos/RustGIS#2303: Both PRs concern whitespace handling and notices in the CSV reader. This PR counts whitespace-only values dropped from non-text columns.
CSV and workbook import now reports whitespace-only values that become null in numeric columns. No concrete merge-blocking risk was found.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: whitespace-only CSV values that become null are now counted. It follows the conventional-commit style and matches the raw summary and objectives. It is specific enough…
Description check
The description covers the Summary and Testing sections with specific content. The UI evidence section is handled correctly: it has no visible UI change, and the template line is not removed. The Rela…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: whitespace-only CSV values that become null are now counted. It follows the conventional-commit style and matches the raw summary and objectives. It is specific enough for a teammate scanning history.
Full details: Description check
Explanation
The description covers the Summary and Testing sections with specific content. The UI evidence section is handled correctly: it has no visible UI change, and the template line is not removed. The Related issue section says 'Part of #1998', which satisfies the template. The description is complete enough to pass.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
A rabbit checks each CSV cell, Whitespace lost gets counted well. The fields appear within the note, While text stays as it was wrote. Clean rows pass without a sound.
Recent review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: ASSERTIVE
Plan: Advanced
Run ID: d57eb506-71b3-4055-8750-552e900276b3
Commits
Reviewing files that changed from the base of the PR and between f81b3b5 and 562ff11.
Files selected for processing: 1
crates/data/src/io.rs
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 3 remain after this review.
GitHub Pages takes a minute or two to publish a new commit. Newer commits from the fork aren't published until a maintainer adds the preview label (once per commit).
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
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.
Summary
A CSV cell containing only spaces could become null when its column was inferred as numeric, without a loss notice. The shared CSV and workbook table reader now counts those actual conversions and emits one DroppedValue notice with the affected count and column names.
Column inference and parsed values keep their existing behavior. Genuinely empty cells, explicit null markers and whitespace retained in text columns are excluded. XML readers normalize their text earlier and are outside this change. The shared reader reaches existing desktop, browser, CLI, Python and phone import paths without new commands or controls. Counts use field-sized metadata and add no layer copy.
Testing
562ff11c11.Related issue
Part of #1998.
Summary by CodeRabbit