mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-07-07 17:04:59 +00:00
Fix bug when parsing a Snowflake stage with ;
suffix (#1688)
This commit is contained in:
parent
7980c866a3
commit
784605c913
2 changed files with 5 additions and 1 deletions
|
@ -625,7 +625,7 @@ pub fn parse_stage_name_identifier(parser: &mut Parser) -> Result<Ident, ParserE
|
|||
let mut ident = String::new();
|
||||
while let Some(next_token) = parser.next_token_no_skip() {
|
||||
match &next_token.token {
|
||||
Token::Whitespace(_) => break,
|
||||
Token::Whitespace(_) | Token::SemiColon => break,
|
||||
Token::Period => {
|
||||
parser.prev_token();
|
||||
break;
|
||||
|
|
|
@ -3102,6 +3102,10 @@ fn parse_ls_and_rm() {
|
|||
};
|
||||
|
||||
snowflake().verified_stmt(r#"LIST @"STAGE_WITH_QUOTES""#);
|
||||
// Semi-colon after stage name - should terminate the stage name
|
||||
snowflake()
|
||||
.parse_sql_statements("LIST @db1.schema1.stage1/dir1/;")
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue