polars-cli icon indicating copy to clipboard operation
polars-cli copied to clipboard

`polars-cli` complain that you're using `scan_csv` to read a compressed file even when using `read_csv`

Open apcamargo opened this issue 11 months ago • 1 comments

Checks

  • [X] I have checked that this issue has not already been reported.

  • [X] I have confirmed this bug exists on the latest version of the Polars CLI.

Reproducible example

〉select * FROM read_csv('data.tsv.gz');
Error: cannot scan compressed csv; use `read_csv` for compressed data


### Issue description

`polars-cli` complains that it can't scan compressed files, and suggests using `read_csv`. My understanding here is that`polars-cli` uses `scan_csv` behind the scenes even though the command we use is called `read_csv`. In this case, maybe the error message should be adjusted to make sense in the context of `polars-cli`?

### Expected behavior

The function should either (1) be able to read compressed files (which would require using `read_csv` as a backend), or (2) have an error message saying that `polars-cli` can't read compressed files (or suggesting an alternative way of reading those)

### Installed version

0.7.0

apcamargo avatar Mar 07 '24 22:03 apcamargo