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

[python] Still can't use compression in ds.write_datset. #44851

Open
XiaomoWu opened this issue Nov 25, 2024 · 0 comments
Open

[python] Still can't use compression in ds.write_datset. #44851

XiaomoWu opened this issue Nov 25, 2024 · 0 comments

Comments

@XiaomoWu
Copy link

Describe the bug, including details regarding any error messages, version, and platform.

I'm trying to provide compress options to ds.write_dataset but all the following attempts fail:

import pyarrow as pa
import pyarrow.dataset as ds

x = pa.table({"a": [1, 2, 3], "b": [4, 5, 6]})

# Error: TypeError: make_write_options() needs an argument
ds.write_dataset(
    x, format="ipc", base_dir="test",
    file_options=ds.IpcFileFormat.make_write_options(compression="lz4"))

# Error: TypeError: make_write_options() needs an argument
ds.write_dataset(
    x, format="feather", base_dir="test",
    file_options=ds.FeatherFileFormat.make_write_options(compression="lz4"))

# Error: AttributeError: 'pyarrow.lib.IpcWriteOptions' object has no attribute 'format'
ds.write_dataset(
    x, format="ipc", base_dir="test",
    file_options=pa.ipc.IpcWriteOptions(compression="lz4"))

What's interesting is that this should already be fixed, as discussed in #33196.

OS: Ubuntu 24.04
pyarrow: 18.0.0

Component(s)

Python

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

No branches or pull requests

1 participant