We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 91b2db8 commit 88c5507Copy full SHA for 88c5507
src/parser/mod.rs
@@ -9833,11 +9833,13 @@ impl<'a> Parser<'a> {
9833
Ok(DataType::AnyType)
9834
}
9835
Keyword::TABLE => {
9836
- if self.peek_token() != Token::LParen {
9837
- Ok(DataType::Table(None))
9838
- } 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 {
9839
let columns = self.parse_returns_table_columns()?;
9840
Ok(DataType::Table(Some(columns)))
9841
+ } else {
9842
+ Ok(DataType::Table(None))
9843
9844
9845
Keyword::SIGNED => {
0 commit comments