osipovartem opened a new issue, #14372:
URL: https://github.com/apache/datafusion/issues/14372
### Describe the bug
```rust
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
```rust
/// 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_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]