bombsimon commented on code in PR #1628:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/1628#discussion_r1905462357


##########
src/ast/dml.rs:
##########
@@ -547,7 +561,15 @@ impl Display for Insert {
             write!(f, "{source}")?;
         }
 
-        if self.source.is_none() && self.columns.is_empty() {
+        if let Some(settings) = &self.settings {
+            write!(f, "SETTINGS {} ", display_comma_separated(settings))?;
+        }
+
+        if let Some(format_clause) = &self.format_clause {
+            write!(f, "{format_clause}")?;
+        }
+
+        if self.source.is_none() && self.columns.is_empty() && 
self.format_clause.is_none() {

Review Comment:
   Well kinda, if we have a format clause we don't want to add `DEFAULT VALUES` 
which we would otherwise since `source` and `columns` are none.
   
   However after rebasing this on `main` we now have an if-else chain that we 
can use so we now have a separate branch for format clause being `Some` and 
another for columns. I also changed the branch for `columns` since it no longer 
needs to check `source` as well in e75aafe.



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to