MERGE INTO semicolon handling (#508)

* SGA-4181 MERGE INTO semicolon handling

* fixed lint warning

Co-authored-by: Maciej Skrzypkowski <maciej.skrzypkowski@satoricyber.com>
This commit is contained in:
Maciej Skrzypkowski 2022-05-25 21:48:15 +02:00 committed by GitHub
parent 09bdb6bb8a
commit cd66034a4a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 1 deletions

View file

@ -4250,7 +4250,7 @@ impl<'a> Parser<'a> {
pub fn parse_merge_clauses(&mut self) -> Result<Vec<MergeClause>, ParserError> {
let mut clauses: Vec<MergeClause> = vec![];
loop {
if self.peek_token() == Token::EOF {
if self.peek_token() == Token::EOF || self.peek_token() == Token::SemiColon {
break;
}
self.expect_keyword(Keyword::WHEN)?;