Repository navigation
Enable multi-file partitioning in dask_cudf.read_parquet - #8393
Conversation
Codecov Report
@@ Coverage Diff @@
## branch-21.08 #8393 +/- ##
===============================================
Coverage ? 10.60%
===============================================
Files ? 116
Lines ? 18606
Branches ? 0
===============================================
Hits ? 1974
Misses ? 16632
Partials ? 0 Continue to review full report at Codecov.
|
|
@randerzander - dask#7557 was merged, and I just confirmed that this PR still enables (very performant) multi-file aggregation via the |
|
Removing |
Good question actually - If CI is using the Dask main branch, we can add an explicit test with |
|
Removing |
|
@devavret - Just added test coverage |
| else: | ||
| (path, row_group, partition_keys) = piece | ||
| if not isinstance(pieces, list): | ||
| pieces = [pieces] |
There was a problem hiding this comment.
Should this be ?
| pieces = [pieces] | |
| pieces = list(pieces) |
in case pieces is a numpy array or tuple
There was a problem hiding this comment.
Sorry - I know this is a bit ugly :/
We cant use list(pieces), because pieces will either be a tuple, a string, a list of strings, or a list of tuples. For newer versions of Dask, this should always be a list already. For older versions, however, we want to convert a string into a list of strings, and a tuple into a list of tuples.
| return (new_meta, stats, parts, index) | ||
|
|
||
| @classmethod | ||
| def multi_support(cls): |
There was a problem hiding this comment.
Where is this being used ?
There was a problem hiding this comment.
It is used upstream (in Dask) to check if we support pieces being passed in a as a list in read_partition. So, it is an "opt-in" mechanism.
|
@gpucibot merge |
Depends on dask#7557
This PR updates
dask_cudf.read_parquetto enable multi-file aggregation when thechunksizeparameter is used. This change enables dramatic (>50x) improvements when the dataset contains many small files, which is somewhat common for hive/directory-partitioned data.Motivating Example