svilupp opened a new pull request, #400: URL: https://github.com/apache/arrow-julia/pull/400
This PR proposes to introduce automated partitioning of the provided tables when writing. Nowadays, most machines are multithreaded and `Arrow.write()` provides multithreaded writing for partitioned data. However, a user must explicitly partition their data. Unfortunately, most users do not realize that both their write and subsequent read operations will not be multithreaded without such partitioning (there is an issue to improve the docs). This PR defaults to partitioning data if it's larger than 64K rows (should be beneficial on most systems) to enable better Arrow.jl performance on both read and write. Implementation: - the new kwarg is called `chunksize` (maps to PyArrow and should be broadly understood) - uses default `chunksize` of 64000 rows, as per [`PyArrow.write_feather`](https://arrow.apache.org/docs/python/generated/pyarrow.feather.write_feather.html) - allows users to opt-out by providing `chunksize=nothing` - partitioning is done via `Iterators.partition(Tables.rows(tbl),chunksize)` for all Tables.jl-compatible sources (checks `Tables.istable`) Some resources: - [PyArrow write_feather docs](https://arrow.apache.org/docs/python/generated/pyarrow.feather.write_feather.html) - Dataframes.jl introduces overload for `Iterators.partition` in [1.5 Release](https://github.com/JuliaData/DataFrames.jl/pull/3212) - [Arrow.jl author's blog post on partioning](https://quinnj.hashnode.dev/partition-all-the-datas) (sidenote: I really enjoy your posts - please write more :-) ) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
