@@ -4209,6 +4209,8 @@ impl<'a> Parser<'a> {
42094209 self.parse_create_virtual_table()
42104210 } else if self.parse_keyword(Keyword::SCHEMA) {
42114211 self.parse_create_schema()
4212+ } else if self.parse_keywords(&[Keyword::PARTITIONED, Keyword::INDEX]) {
4213+ self.parse_create_partitioned_index()
42124214 } else if self.parse_keyword(Keyword::DATABASE) {
42134215 self.parse_create_database()
42144216 } else if self.parse_keyword(Keyword::ROLE) {
@@ -6130,6 +6132,19 @@ impl<'a> Parser<'a> {
61306132 Ok(Statement::Discard { object_type })
61316133 }
61326134
6135+ pub fn parse_create_partitioned_index(&mut self) -> Result<Statement, ParserError> {
6136+ let if_not_exists = self.parse_keywords(&[Keyword::IF, Keyword::NOT, Keyword::EXISTS]);
6137+ let name = self.parse_object_name(false)?;
6138+ self.expect_token(&Token::LParen)?;
6139+ let columns = self.parse_comma_separated(Parser::parse_column_def)?;
6140+ self.expect_token(&Token::RParen)?;
6141+ Ok(Statement::CreatePartitionedIndex {
6142+ name,
6143+ columns,
6144+ if_not_exists,
6145+ })
6146+ }
6147+
61336148 pub fn parse_create_index(&mut self, unique: bool) -> Result<Statement, ParserError> {
61346149 let concurrently = self.parse_keyword(Keyword::CONCURRENTLY);
61356150 let if_not_exists = self.parse_keywords(&[Keyword::IF, Keyword::NOT, Keyword::EXISTS]);
0 commit comments