BurntSushi / BurntSushi/rust-csv

Request: Allow deserializing missing fields

Open
#166 7 comments 2 reactions 0 assignees View on GitHub
question
Dominant language
Rust
Stars
2k
Forks
257
PR merge metrics
No merged PRs in 30d

Description

I have some TSV files that have trimmed rows to avoid unnecessary `\t\t\t` chains.

It would be nice if this library could support an option to return default value for these missing fields.

In my case I don't even need those missing fields, I just need first two, but I get `expected field, but got end of row` for some fields that I am not even interested in.

Thx for the crate, anyway ;)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the deserialization path that emits “expected field, but got end of row” and read the surrounding tests. Determine how an option for trimmed TSV rows should supply defaults for missing fields while allowing callers to read only the fields they need. Done means the behavior is covered by tests for missing trailing fields and normal rows.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
data-engineering
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.