devinjdangelo commented on code in PR #7283: URL: https://github.com/apache/arrow-datafusion/pull/7283#discussion_r1294490205
########## datafusion/core/tests/sqllogictests/test_files/copy.slt: ########## @@ -16,29 +16,141 @@ # under the License. # tests for copy command - statement ok create table source_table(col1 integer, col2 varchar) as values (1, 'Foo'), (2, 'Bar'); -# Copy from table -statement error DataFusion error: This feature is not implemented: `COPY \.\. TO \.\.` statement is not yet supported -COPY source_table to '/tmp/table.parquet'; +# Copy to directory as multiple files +query IT +COPY source_table TO 'tests/sqllogictests/test_files/scratch/table' (format parquet, per_thread_output true); +---- +2 + +#Explain copy queries not currently working Review Comment: I noticed that `EXPLAIN <copy statement>` currently does not work. When prefixed by `EXPLAIN` the subsequent `COPY` token is being parsed into the `COPY ` statement defined in the `sqlparser` crate. We haven't implemented a logical plan and our expected syntax for `COPY` is different from `sqlparser`, so this leads to various errors. When the `COPY ` token starts the statement, it is correctly parsed as a DFStatement defined within DataFusion. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
