LucaCappelletti94 commented on code in PR #2077:
URL:
https://github.com/apache/datafusion-sqlparser-rs/pull/2077#discussion_r2527903678
##########
src/ast/mod.rs:
##########
@@ -4579,19 +4574,97 @@ impl fmt::Display for Statement {
if !legacy_options.is_empty() {
write!(f, " {}", display_separated(legacy_options, " "))?;
}
+
+ let mut null_symbol = "\\N";
+ let mut delimiter = '\t';
+ let mut quote = '"';
+ let mut escape = '\\';
+
+ // Apply options
+ for option in options {
+ match option {
+ CopyOption::Delimiter(c) => {
+ delimiter = *c;
+ }
+ CopyOption::Quote(c) => {
+ quote = *c;
+ }
+ CopyOption::Escape(c) => {
+ escape = *c;
+ }
+ CopyOption::Null(null) => {
+ null_symbol = null;
+ }
+ _ => {}
Review Comment:
Moved all of the logic into a new struct `CsvFormatOptions` and added
exaustive match.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]