mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-12-23 11:12:51 +00:00
ClickHouse: create view with fields and data types (#1292)
This commit is contained in:
parent
029a999645
commit
375742d1fa
5 changed files with 60 additions and 2 deletions
|
|
@ -7282,7 +7282,16 @@ impl<'a> Parser<'a> {
|
|||
} else {
|
||||
None
|
||||
};
|
||||
Ok(ViewColumnDef { name, options })
|
||||
let data_type = if dialect_of!(self is ClickHouseDialect) {
|
||||
Some(self.parse_data_type()?)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
Ok(ViewColumnDef {
|
||||
name,
|
||||
data_type,
|
||||
options,
|
||||
})
|
||||
}
|
||||
|
||||
/// Parse a parenthesized comma-separated list of unqualified, possibly quoted identifiers
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue