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

compression not passed to engine.write_partition #5319

Closed
birdsarah opened this issue Aug 26, 2019 · 2 comments · Fixed by #5335
Closed

compression not passed to engine.write_partition #5319

birdsarah opened this issue Aug 26, 2019 · 2 comments · Fixed by #5335

Comments

@birdsarah
Copy link
Contributor

I'm trying to debug a separate issue (my files never start writing) and so I've been carefully reading parquet/core.py

If I'm understanding it correctly, the compression keyword is not passed to engine.write_partition

https://github.com/dask/dask/blob/master/dask/dataframe/io/parquet/core.py#L458-L481

    # write parts
    dwrite = delayed(engine.write_partition)
    parts = [
        dwrite(
            d,
            path,
            fs,
            filename,
            partition_on,
            write_metadata_file,
            fmd=meta,
            index_cols=index_cols,
            **kwargs_pass
        )
        for d, filename in zip(df.to_delayed(), filenames)
    ]

    # single task to complete
    out = delayed(lambda x: None)(parts)
    if write_metadata_file:
        out = delayed(engine.write_metadata)(
            parts, meta, fs, path, append=append, compression=compression
        )

kwargs_pass will not have compression in as it's a _to_parquet_kwargs

cc @rjzamora

@rjzamora
Copy link
Member

Looks to me like you are correct @birdsarah - This seems like a bug. I will try to explore this soonish.

@jmcotelo
Copy link

I opened #5266 a while ago and it seems this issue is the very same thing. I had no time to properly sit down and write tests for it. In any case, if @birdsarah solves this, #5266 could be closed as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants