Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compressed CSV files don't get batch read #28

Open
nebfield opened this issue Jul 2, 2024 · 0 comments
Open

Compressed CSV files don't get batch read #28

nebfield opened this issue Jul 2, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@nebfield
Copy link
Member

nebfield commented Jul 2, 2024

The process works fine but consumes a bunch of RAM. I only realised this after getting consistent OOM problems and then added some extra logging statements.

When text files are compressed the polars batch reader decompresses the file in memory and reads it

After digging through some polars issues a good workaround is using pyarrow.csv to stream the CSV

Before we used python's csv module to create pyarrow record batches, which was very slow. pyarrow.csv should be much faster but we'd need to be careful and profile it.

@smlmbrt smlmbrt added the enhancement New feature or request label Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants