return error instead of panic for invalid syntax on views

I have accidentally typed "create materialized views", and noticed
that this panics, instead of returning an error. Fix it.
This commit is contained in:
Glauber Costa
2025-09-17 21:19:10 -05:00
parent f149b40e75
commit cb7c04ffad

View File

@@ -749,7 +749,7 @@ impl<'a> Parser<'a> {
fn parse_create_materialized_view(&mut self) -> Result<Stmt> {
eat_assert!(self, TK_MATERIALIZED);
eat_assert!(self, TK_VIEW);
eat_expect!(self, TK_VIEW);
let if_not_exists = self.parse_if_not_exists()?;
let view_name = self.parse_fullname(false)?;
let columns = self.parse_eid_list(false)?;