@@ -3554,6 +3554,8 @@ impl<'a> Parser<'a> {
35543554 self . parse_create_virtual_table ( )
35553555 } else if self . parse_keyword ( Keyword :: SCHEMA ) {
35563556 self . parse_create_schema ( )
3557+ } else if self . parse_keywords ( & [ Keyword :: PARTITIONED , Keyword :: INDEX ] ) {
3558+ self . parse_create_partitioned_index ( )
35573559 } else if self . parse_keyword ( Keyword :: DATABASE ) {
35583560 self . parse_create_database ( )
35593561 } else if self . parse_keyword ( Keyword :: ROLE ) {
@@ -5288,6 +5290,19 @@ impl<'a> Parser<'a> {
52885290 Ok ( Statement :: Discard { object_type } )
52895291 }
52905292
5293+ pub fn parse_create_partitioned_index ( & mut self ) -> Result < Statement , ParserError > {
5294+ let if_not_exists = self . parse_keywords ( & [ Keyword :: IF , Keyword :: NOT , Keyword :: EXISTS ] ) ;
5295+ let name = self . parse_object_name ( false ) ?;
5296+ self . expect_token ( & Token :: LParen ) ?;
5297+ let columns = self . parse_comma_separated ( Parser :: parse_column_def) ?;
5298+ self . expect_token ( & Token :: RParen ) ?;
5299+ Ok ( Statement :: CreatePartitionedIndex {
5300+ name,
5301+ columns,
5302+ if_not_exists,
5303+ } )
5304+ }
5305+
52915306 pub fn parse_create_index ( & mut self , unique : bool ) -> Result < Statement , ParserError > {
52925307 let concurrently = self . parse_keyword ( Keyword :: CONCURRENTLY ) ;
52935308 let if_not_exists = self . parse_keywords ( & [ Keyword :: IF , Keyword :: NOT , Keyword :: EXISTS ] ) ;
0 commit comments