BigQuery: support of CREATE VIEW IF NOT EXISTS (#1118)

This commit is contained in:
Aleksei Piianin 2024-02-04 14:59:03 +01:00 committed by GitHub
parent 8fae601743
commit 60baea4ae7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 31 additions and 1 deletions

View file

@ -3482,7 +3482,7 @@ impl<'a> Parser<'a> {
) -> Result<Statement, ParserError> {
let materialized = self.parse_keyword(Keyword::MATERIALIZED);
self.expect_keyword(Keyword::VIEW)?;
let if_not_exists = dialect_of!(self is SQLiteDialect|GenericDialect)
let if_not_exists = dialect_of!(self is BigQueryDialect|SQLiteDialect|GenericDialect)
&& self.parse_keywords(&[Keyword::IF, Keyword::NOT, Keyword::EXISTS]);
// Many dialects support `OR ALTER` right after `CREATE`, but we don't (yet).
// ANSI SQL and Postgres support RECURSIVE here, but we don't support it either.