We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4dd05d1 commit 486f85aCopy full SHA for 486f85a
src/parser/mod.rs
@@ -9851,11 +9851,13 @@ impl<'a> Parser<'a> {
9851
Ok(DataType::AnyType)
9852
}
9853
Keyword::TABLE => {
9854
- if self.peek_token() != Token::LParen {
9855
- Ok(DataType::Table(None))
9856
- } else {
+ // an LParen after the TABLE keyword indicates that table columns are being defined
+ // whereas no LParen indicates an anonymous table expression will be returned
+ if self.peek_token() == Token::LParen {
9857
let columns = self.parse_returns_table_columns()?;
9858
Ok(DataType::Table(Some(columns)))
9859
+ } else {
9860
+ Ok(DataType::Table(None))
9861
9862
9863
Keyword::SIGNED => {
0 commit comments