alamb commented on code in PR #9744:
URL: https://github.com/apache/arrow-datafusion/pull/9744#discussion_r1536230663
##########
datafusion/sqllogictest/test_files/copy.slt:
##########
@@ -514,6 +514,44 @@ OPTIONS (
);
+# Format Options Support with format in OPTIONS i.e. COPY { table_name | query
} TO 'file_name' OPTIONS (format <format-name>, ...)
+
+query I
+COPY (select * from (values (1))) to 'test_files/scratch/copy/'
+OPTIONS (format parquet);
+----
+1
+
+query I
+COPY (select * from (values (1))) to 'test_files/scratch/copy/'
+OPTIONS (format parquet, compression 'zstd(10)');
+----
+1
+
+query I
+COPY (select * from (values (1))) to 'test_files/scratch/copy/'
+OPTIONS (format json, compression gzip);
+----
+1
+
+query I
+COPY (select * from (values (1))) to 'test_files/scratch/copy/'
+OPTIONS (
+ format csv,
+ has_header false,
+ compression xz,
+ datetime_format '%FT%H:%M:%S.%9f',
+ delimiter ';',
+ null_value 'NULLVAL'
+);
+----
+1
+
+query error DataFusion error: Invalid or Unsupported Configuration: This
feature is not implemented: Unknown FileType: NOTVALIDFORMAT
Review Comment:
I agree the error could be nicer, but in this case I think we should keep
the same basic pattern as the rest of the code (and perhaps update the pattern
in a follow on PR)
--
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]