Support TO in CREATE VIEW clause for Clickhouse (#1313)

Co-authored-by: Ifeanyi Ubah <ify1992@yahoo.com>
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
This commit is contained in:
Bidaya0 2024-06-23 19:13:16 +08:00 committed by GitHub
parent f16c1afed0
commit f3d2f78fb2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 51 additions and 2 deletions

View file

@ -4172,6 +4172,14 @@ impl<'a> Parser<'a> {
};
}
let to = if dialect_of!(self is ClickHouseDialect | GenericDialect)
&& self.parse_keyword(Keyword::TO)
{
Some(self.parse_object_name(false)?)
} else {
None
};
let comment = if dialect_of!(self is SnowflakeDialect | GenericDialect)
&& self.parse_keyword(Keyword::COMMENT)
{
@ -4209,6 +4217,7 @@ impl<'a> Parser<'a> {
with_no_schema_binding,
if_not_exists,
temporary,
to,
})
}