Skip to content

COPY TO does not produce an output file for the empty set #18073

@bert-beyondloops

Description

@bert-beyondloops

Describe the bug

Executing following sql does not effectively create an output file on disk :

COPY (SELECT 1 AS id WHERE FALSE) TO 'table_no_rows.parquet';

I would expect it creates a parquet file containing 0 rows including the schema metadata.

The fact you can still query the schema of such a table is still valuable information.

To Reproduce

COPY (SELECT 1 AS id WHERE FALSE) TO 'table_no_rows.parquet';

does not create the file 'table_no_rows.parquet' on disk.

Expected behavior

I would expect a valid parquet file written on disk containing only the schema metadata without any rows included.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions