mithrandie / csvq

SQL-like query language for csv
https://mithrandie.github.io/csvq
MIT License
1.5k stars 65 forks source link

--allow-uneven-fields not working properly #59

Closed pkoppstein closed 3 years ago

pkoppstein commented 3 years ago

The --allow-uneven-fields command-line option does not allow jagged input properly, as illustrated by:

cat test.tsv | csvq --allow-uneven-fields -i tsv 'select * from STDIN LIMIT 5;'
panic: runtime error: slice bounds out of range [:2] with capacity 1

where

$ cat test.tsv
a   b   c
1   2
3
4

The last two lines are both missing two fields.

mithrandie commented 3 years ago

This bug has been fixed and the fix is included in the version 1.15.2. Thank you.