apache / arrow-cookbook

Apache Arrow Cookbook
https://arrow.apache.org/
Apache License 2.0
96 stars 46 forks source link

[Python] test failure in io.rst #140

Open pitrou opened 2 years ago

pitrou commented 2 years ago

make pytest gives me the following error:

**********************************************************************
File "io.rst", line 511, in default
Failed example:
    import pyarrow as pa
    import pyarrow.dataset as ds

    ds.write_dataset(data, "./partitioned", format="parquet",
                     partitioning=ds.partitioning(pa.schema([("year", pa.int16())])))
Exception raised:
    Traceback (most recent call last):
      File "/home/antoine/miniconda3/envs/cookbook/lib/python3.9/doctest.py", line 1336, in __run
        exec(compile(example.source, filename, "single",
      File "<doctest default[0]>", line 4, in <module>
        ds.write_dataset(data, "./partitioned", format="parquet",
      File "/home/antoine/miniconda3/envs/cookbook/lib/python3.9/site-packages/pyarrow/dataset.py", line 878, in write_dataset
        _filesystemdataset_write(
      File "pyarrow/_dataset.pyx", line 3408, in pyarrow._dataset._filesystemdataset_write
      File "pyarrow/error.pxi", line 99, in pyarrow.lib.check_status
    pyarrow.lib.ArrowInvalid: Could not write to ./partitioned as the directory is not empty and existing_data_behavior is to error
**********************************************************************
pitrou commented 2 years ago

cc @amol-