mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-10-07 20:50:21 +00:00
feat: Include end token in ALTER TABLE
statement (#1999)
Co-authored-by: Ifeanyi Ubah <ify1992@yahoo.com>
This commit is contained in:
parent
27544f9343
commit
356308b348
5 changed files with 31 additions and 1 deletions
|
@ -9263,6 +9263,12 @@ impl<'a> Parser<'a> {
|
|||
});
|
||||
}
|
||||
|
||||
let end_token = if self.peek_token_ref().token == Token::SemiColon {
|
||||
self.peek_token_ref().clone()
|
||||
} else {
|
||||
self.get_current_token().clone()
|
||||
};
|
||||
|
||||
Ok(Statement::AlterTable {
|
||||
name: table_name,
|
||||
if_exists,
|
||||
|
@ -9271,6 +9277,7 @@ impl<'a> Parser<'a> {
|
|||
location,
|
||||
on_cluster,
|
||||
iceberg,
|
||||
end_token: AttachedToken(end_token),
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue