mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-10-11 06:22:04 +00:00
redshift: add support for CREATE VIEW … WITH NO SCHEMA BINDING (#979)
This commit is contained in:
parent
40e2ecbdf3
commit
c811e22605
5 changed files with 46 additions and 2 deletions
|
@ -2974,6 +2974,15 @@ impl<'a> Parser<'a> {
|
|||
self.expect_keyword(Keyword::AS)?;
|
||||
let query = Box::new(self.parse_query()?);
|
||||
// Optional `WITH [ CASCADED | LOCAL ] CHECK OPTION` is widely supported here.
|
||||
|
||||
let with_no_schema_binding = dialect_of!(self is RedshiftSqlDialect | GenericDialect)
|
||||
&& self.parse_keywords(&[
|
||||
Keyword::WITH,
|
||||
Keyword::NO,
|
||||
Keyword::SCHEMA,
|
||||
Keyword::BINDING,
|
||||
]);
|
||||
|
||||
Ok(Statement::CreateView {
|
||||
name,
|
||||
columns,
|
||||
|
@ -2982,6 +2991,7 @@ impl<'a> Parser<'a> {
|
|||
or_replace,
|
||||
with_options,
|
||||
cluster_by,
|
||||
with_no_schema_binding,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue