-
Notifications
You must be signed in to change notification settings - Fork 567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix extra whitespace printed before ON CONFLICT
#1037
Fix extra whitespace printed before ON CONFLICT
#1037
Conversation
@@ -3513,7 +3513,7 @@ impl fmt::Display for OnInsert { | |||
" ON DUPLICATE KEY UPDATE {}", | |||
display_comma_separated(expr) | |||
), | |||
Self::OnConflict(o) => write!(f, " {o}"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The bug is that the whitespace here is doubled up with the whitespace added a few lines below: https://github.com/sqlparser-rs/sqlparser-rs/blob/edeb9a2df0c55bf072dcb66b10661987dc926b2d/src/ast/mod.rs#L3522
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @CDThomas
Pull Request Test Coverage Report for Build 6916193631
💛 - Coveralls |
Looks like there is a CI failure but after that this PR should be good to go Update: the CI failure is related to the new rust release. I think a merge up from main will fix that |
yes, I included the small lint fix in my previous pr, which is now merged |
edeb9a2
to
de2843e
Compare
apache#1037 removed the extra whitespace, so we need to remove it here as well now.
I noticed while working on #1036 that there's some extra whitespace printed before
ON CONFLICT
clauses in insert statements. This PR should fix it up by removing the extra space in theDisplay
impl.