Skip to content

sniff: refactor to just use the csv crate and drop the qsv-sniffer crate #1976

@jqnatividad

Description

@jqnatividad

Currently, sniff fails to detect valid CSV files that other qsv commands can successfully open.
This is because, sniff is powered by the qsv-sniffer crate, which is a qsv-optimized fork of the unmaintained csv-sniffer crate.
The csv-sniffer crate uses the Viterbi algorithm to sniff and infer CSV metadata and there are fairly common CSV configurations where it fails.

Describe the solution you'd like
Remove the qsv-sniffer crate altogether and just use the csv crate to get CSV metadata.

Describe alternatives you've considered
There was a discussion to create a clone of python's csv-sniffer in #1719 , but that's a non-trivial project by itself

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependenciesPull requests that update a dependency fileenhancementNew feature or request. Once marked with this label, its in the backlog.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions