jqnatividad / qsv

CSVs sliced, diced & analyzed.
https://qsv.dathere.com
The Unlicense
2.43k stars 70 forks source link

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

Open jqnatividad opened 1 month ago

jqnatividad commented 1 month ago

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

jqnatividad commented 1 month ago

See https://github.com/jqnatividad/qsv/pull/1977