mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-10-11 14:32:04 +00:00
Merge pull request #94 from benesch/empty-create-table
Support CREATE TABLE with no columns
This commit is contained in:
commit
fdbf64c64d
2 changed files with 7 additions and 1 deletions
|
@ -854,7 +854,7 @@ impl Parser {
|
|||
fn parse_columns(&mut self) -> Result<(Vec<SQLColumnDef>, Vec<TableConstraint>), ParserError> {
|
||||
let mut columns = vec![];
|
||||
let mut constraints = vec![];
|
||||
if !self.consume_token(&Token::LParen) {
|
||||
if !self.consume_token(&Token::LParen) || self.consume_token(&Token::RParen) {
|
||||
return Ok((columns, constraints));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue