Skip to content

COPY TO fails on passing options for format through cli #9707

Closed

Description

@tinfoil-knight

Describe the bug

COPY TO fails with Error: Invalid or Unsupported Configuration: Specify a format for TableOptions even when valid configuration options are provided for the format.

To Reproduce

Clone the main branch. In the datafusion-cli directory, run this command:

cargo run -- --command "COPY (VALUES (1, 'Foo'), (2, 'Bar')) TO 'test_files/scratch/copy/tab.parquet' STORED AS parquet OPTIONS ('format.compression' 'zstd(10)');"

Expected behavior

The command should run without error & the values should be copied to the provided destination.

Additional context

Running the same query in a SQL Logic Test (.slt) doesn't throw any error. See copy.slt which has tests with similar commands to the one described above.

The error originates here:
https://github.com/apache/arrow-datafusion/blob/ad8d552b9f150c3c066b0764e84f72b667a649ff/datafusion/common/src/config.rs#L1175-L1180

Activity

  1. tinfoil-knight commented on Mar 20, 2024

    @tinfoil-knight
    ContributorAuthor

    take

  2. added
    regressionSomething that used to work no longer does
    on Mar 20, 2024
  3. alamb commented on Mar 20, 2024

    @alamb
    Contributor

    Thank you @tinfoil-knight

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

Metadata

Metadata

Labels

bugSomething isn't workingregressionSomething that used to work no longer does

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions