mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-09-08 23:20:34 +00:00
Support create index with clause (#1389)
Co-authored-by: Ifeanyi Ubah <ify1992@yahoo.com> Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
This commit is contained in:
parent
d64beea4d4
commit
4d52ee7280
7 changed files with 92 additions and 0 deletions
|
@ -5324,6 +5324,17 @@ impl<'a> Parser<'a> {
|
|||
None
|
||||
};
|
||||
|
||||
let with = if self.dialect.supports_create_index_with_clause()
|
||||
&& self.parse_keyword(Keyword::WITH)
|
||||
{
|
||||
self.expect_token(&Token::LParen)?;
|
||||
let with_params = self.parse_comma_separated(Parser::parse_expr)?;
|
||||
self.expect_token(&Token::RParen)?;
|
||||
with_params
|
||||
} else {
|
||||
Vec::new()
|
||||
};
|
||||
|
||||
let predicate = if self.parse_keyword(Keyword::WHERE) {
|
||||
Some(self.parse_expr()?)
|
||||
} else {
|
||||
|
@ -5340,6 +5351,7 @@ impl<'a> Parser<'a> {
|
|||
if_not_exists,
|
||||
include,
|
||||
nulls_distinct,
|
||||
with,
|
||||
predicate,
|
||||
}))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue