-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
DFParser::parse_sql_with_dialect(sql, dialect.as_ref())?trying to parse COPY INTO .. as Statement::CopyTo even if we set "snowflake" dialect where Statement::CopyIntoSnowflake already supported.
The possible reason of the issue related to Keyword::COPY logic. We need to check if the next token != Keyword::INTO to pass such sql to sqlparser-rs
/// Parse a new expression
pub fn parse_statement(&mut self) -> Result<Statement, ParserError> {
match self.parser.peek_token().token {
Token::Word(w) => {
match w.keyword {
Keyword::COPY => {
self.parser.next_token();
self.parse_copy()
}
}
}
...To Reproduce
No response
Expected behavior
With "snowflake" dialect COPY INTO statement should be parsed correctly as Statement::CopyIntoSnowflake
Additional context
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working