feat: Include end token in ALTER TABLE statement (#1999)

Co-authored-by: Ifeanyi Ubah <ify1992@yahoo.com>
This commit is contained in:
Tyler White 2025-08-09 02:31:58 -04:00 committed by GitHub
parent 27544f9343
commit 356308b348
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 31 additions and 1 deletions

View file

@ -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),
})
}