mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-07-07 17:04:59 +00:00
Clickhouse: support empty parenthesized options (#1925)
Some checks failed
license / Release Audit Tool (RAT) (push) Has been cancelled
Rust / codestyle (push) Has been cancelled
Rust / lint (push) Has been cancelled
Rust / benchmark-lint (push) Has been cancelled
Rust / compile (push) Has been cancelled
Rust / docs (push) Has been cancelled
Rust / compile-no-std (push) Has been cancelled
Rust / test (beta) (push) Has been cancelled
Rust / test (nightly) (push) Has been cancelled
Rust / test (stable) (push) Has been cancelled
Some checks failed
license / Release Audit Tool (RAT) (push) Has been cancelled
Rust / codestyle (push) Has been cancelled
Rust / lint (push) Has been cancelled
Rust / benchmark-lint (push) Has been cancelled
Rust / compile (push) Has been cancelled
Rust / docs (push) Has been cancelled
Rust / compile-no-std (push) Has been cancelled
Rust / test (beta) (push) Has been cancelled
Rust / test (nightly) (push) Has been cancelled
Rust / test (stable) (push) Has been cancelled
This commit is contained in:
parent
f2fba48a7a
commit
1a33abda63
2 changed files with 6 additions and 2 deletions
|
@ -16253,9 +16253,9 @@ impl<'a> Parser<'a> {
|
|||
|
||||
fn parse_parenthesized_identifiers(&mut self) -> Result<Vec<Ident>, ParserError> {
|
||||
self.expect_token(&Token::LParen)?;
|
||||
let partitions = self.parse_comma_separated(|p| p.parse_identifier())?;
|
||||
let idents = self.parse_comma_separated0(|p| p.parse_identifier(), Token::RParen)?;
|
||||
self.expect_token(&Token::RParen)?;
|
||||
Ok(partitions)
|
||||
Ok(idents)
|
||||
}
|
||||
|
||||
fn parse_column_position(&mut self) -> Result<Option<MySQLColumnPosition>, ParserError> {
|
||||
|
|
|
@ -224,6 +224,10 @@ fn parse_create_table() {
|
|||
clickhouse().verified_stmt(
|
||||
r#"CREATE TABLE "x" ("a" "int") ENGINE = MergeTree ORDER BY "x" AS SELECT * FROM "t" WHERE true"#,
|
||||
);
|
||||
clickhouse().one_statement_parses_to(
|
||||
"CREATE TABLE x (a int) ENGINE = MergeTree() ORDER BY a",
|
||||
"CREATE TABLE x (a INT) ENGINE = MergeTree ORDER BY a",
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue