You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "bert-beyondloops (via GitHub)" <gi...@apache.org> on 2025/10/15 12:07:19 UTC

[I] COPY TO does not produce a single output file for a zero rows query [datafusion]

bert-beyondloops opened a new issue, #18073:
URL: https://github.com/apache/datafusion/issues/18073

   ### Describe the bug
   
   Execution following sql does not effectively create a single 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_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] COPY TO does not produce an output file for the empty set [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb closed issue #18073: COPY TO does not produce an output file for the empty set
URL: https://github.com/apache/datafusion/issues/18073


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org