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

parquet::ArrowWriter show allow writing Bloom filters before the end of the file #5859

Closed
progval opened this issue Jun 10, 2024 · 1 comment · Fixed by #5860
Closed

parquet::ArrowWriter show allow writing Bloom filters before the end of the file #5859

progval opened this issue Jun 10, 2024 · 1 comment · Fixed by #5860
Labels
enhancement Any new improvement worthy of a entry in the changelog parquet Changes to the parquet crate

Comments

@progval
Copy link
Contributor

progval commented Jun 10, 2024

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
https://parquet.apache.org/docs/file-format/bloomfilter/#file-format mentions two ways to layout Bloom Filters: either write each Bloom Filter after its row group, or write all Bloom Filters at the end; then write pointers to Bloom Filters in the footer.

The parquet crate opts for writing all Bloom Filters at the end, while computing them while each row group is being written. This means Bloom Filters need to be kept in memory while files are being written, which can take significant space. In my use case, ~4TB of Bloom filters while writing a 20TB table.

Describe the solution you'd like
Either switch to the other layout (interleaved with row groups), provide an option to switch between the two, or allow users to flush when they want to.

Describe alternatives you've considered
Expecting users to close the ArrowWriter from time to time, and opening a new one. This would mitigate the memory usage, but not entirely remove it. When writing in parallel from multiple threads, it also means they need to stagger re-openings when writing many files in parallel in order to avoid spikes in RAM.

@progval progval added the enhancement Any new improvement worthy of a entry in the changelog label Jun 10, 2024
@alamb alamb added the parquet Changes to the parquet crate label Jul 2, 2024
@alamb
Copy link
Contributor

alamb commented Jul 2, 2024

label_issue.py automatically added labels {'parquet'} from #5860

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Any new improvement worthy of a entry in the changelog parquet Changes to the parquet crate
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants