Some small optimizations (#1424)

This commit is contained in:
Thomas Dagenais 2024-09-21 06:25:14 -04:00 committed by GitHub
parent 9934f3d931
commit 2403f79f55
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 17 additions and 23 deletions

View file

@ -10552,12 +10552,12 @@ impl<'a> Parser<'a> {
return parser_err!("Unsupported statement REPLACE", self.peek_token().location);
}
let insert = &mut self.parse_insert()?;
if let Statement::Insert(Insert { replace_into, .. }) = insert {
let mut insert = self.parse_insert()?;
if let Statement::Insert(Insert { replace_into, .. }) = &mut insert {
*replace_into = true;
}
Ok(insert.clone())
Ok(insert)
}
/// Parse an INSERT statement, returning a `Box`ed SetExpr