metesynnada commented on code in PR #9604:
URL: https://github.com/apache/arrow-datafusion/pull/9604#discussion_r1527938309
##########
datafusion/sql/src/parser.rs:
##########
@@ -111,15 +116,28 @@ impl fmt::Display for CopyToStatement {
let Self {
source,
target,
+ partitioned_by,
+ stored_as,
options,
+ ..
} = self;
write!(f, "COPY {source} TO {target}")?;
+ if let Some(file_type) = stored_as {
+ write!(f, " STORED AS {}", file_type)?;
+ }
+ if !partitioned_by.is_empty() {
+ write!(f, " PARTITIONED BY ({})", partitioned_by.join(", "))?;
+ }
+
+ if self.has_header {
+ write!(f, " WITH HEADER ROW")?;
+ }
if !options.is_empty() {
let opts: Vec<_> = options.iter().map(|(k, v)| format!("{k}
{v}")).collect();
// print them in sorted order
Review Comment:
It was leftover.
--
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]