devinjdangelo commented on code in PR #9604:
URL: https://github.com/apache/arrow-datafusion/pull/9604#discussion_r1527169854
##########
datafusion/sql/src/parser.rs:
##########
@@ -102,6 +102,12 @@ pub struct CopyToStatement {
pub source: CopyToSource,
/// The URL to where the data is heading
pub target: String,
+ /// Partitioned BY
+ pub partitioned_by: Vec<String>,
+ /// CSV Header row?
+ pub has_header: bool,
+ /// File type (Parquet, NDJSON, CSV, etc)
+ pub stored_as: Option<String>,
Review Comment:
:+1:
##########
datafusion/sqllogictest/test_files/copy.slt:
##########
@@ -54,8 +54,8 @@ select * from validate_partitioned_parquet_bar order by col1;
# Copy to directory as partitioned files
query ITT
-COPY (values (1, 'a', 'x'), (2, 'b', 'y'), (3, 'c', 'z')) TO
'test_files/scratch/copy/partitioned_table2/'
-(format parquet, partition_by 'column2, column3', 'parquet.compression'
'zstd(10)');
+COPY (values (1, 'a', 'x'), (2, 'b', 'y'), (3, 'c', 'z')) TO
'test_files/scratch/copy/partitioned_table2/' STORED AS parquet PARTITIONED BY
(column2, column3)
Review Comment:
This looks pretty cool. Definitely an improvement in readability over the
prior syntax :+1:
--
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]