lei-jia-xing opened a new issue, #3038:
URL: https://github.com/apache/datafusion-sqlparser-rs/issues/3038

   ### Reproduction
   
   With `sqlparser = "=0.64.0"`:
   
   ```rust
   use sqlparser::{dialect::ClickHouseDialect, parser::Parser};
   
   fn main() {
       let sql = "CREATE MATERIALIZED VIEW mv ENGINE = Memory AS SELECT 1 AS 
x;";
       match Parser::parse_sql(&ClickHouseDialect {}, sql) {
           Ok(statements) => println!("{statements:?}"),
           Err(error) => println!("{error}"),
       }
   }
   ```
   
   ### Actual behavior
   
   ```text
   sql parser error: Expected: AS, found: ENGINE at Line: 1, Column: 29
   ```
   
   ### Expected behavior
   
   Parse the materialized view definition and preserve `ENGINE = Memory` in the 
AST. ClickHouse documents an `ENGINE` clause for materialized views that store 
their own data.
   
   [ClickHouse materialized view 
syntax](https://clickhouse.com/docs/en/sql-reference/statements/create/view#materialized-view)
 ยท [Related `TO` clause issue 
#1312](https://github.com/apache/datafusion-sqlparser-rs/issues/1312)


-- 
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]

Reply via email to