Skip to content

Support writing to Arrow files #8504

@alamb

Description

@alamb

Is your feature request related to a problem or challenge?

We currently support reading Arrow files:

https://github.com/apache/arrow-datafusion/blob/95ba48bd2291dd5c303bdaf88cbb55c79d395930/datafusion/sqllogictest/test_files/arrow_files.slt#L1

However, we do not support writing them:

❯ copy (values (1)) to '/tmp/data.arrow';
This feature is not implemented: Writer not implemented for this format

Describe the solution you'd like

I would like to be able to write to arrow files using the COPY command and EXTERNAL TABLEs

The idea would be to implement create_writer_physical_plan

https://github.com/apache/arrow-datafusion/blob/95ba48bd2291dd5c303bdaf88cbb55c79d395930/datafusion/core/src/datasource/file_format/arrow.rs#L51

Following the model of the CSV file format and
https://github.com/apache/arrow-datafusion/blob/95ba48bd2291dd5c303bdaf88cbb55c79d395930/datafusion/core/src/datasource/file_format/csv.rs#L262-L290

Then add tests in copy.slt and arrow_file.slt

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions