Open
Conversation
This is a dumb, mostly-from-scratch implementation of read_parquet. It only supports - local and s3 - column selection - grouping partitions when we have fewer columns (+ threads!) - arrow engine/filesystem It is very broken in many ways, but ... - It's only around 100 lines of code - I get 250 MB/s bandwidth on full column reads on an m6i.xlarge (only 50 MB/s when reading columns though) See dask/dask#10602
d037c82 to
5cc0982
Compare
fjetter
reviewed
Oct 30, 2023
Comment on lines
+475
to
+479
| return pa.concat_tables(list(map(read_arrow_table, batch))) | ||
| else: | ||
| with concurrent.futures.ThreadPoolExecutor(len(batch)) as e: | ||
| parts = list(e.map(read_arrow_table, batch)) | ||
| return pa.concat_tables(parts) |
Member
There was a problem hiding this comment.
FYI concat_tables will concat tables zero copy which is great at first glance (It will essentially just append the batch to a ChunkedArray). However, if the tables are heavily fragmented, i.e. there are many batches, many operations operate very slowly on this (e.g. serialization).
calling combine_chunks on the table merges the batches (but copies data) which is sometimes beneficial. I haven't tested this for the arrow->pandas conversion.
This came up in P2P, primarily in the context of writing the table to disk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a dumb, mostly-from-scratch implementation of read_parquet.
It only supports
It is very broken in many ways, but ...
See dask/dask#10602