We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent de0665c commit cc748c3Copy full SHA for cc748c3
src/parser/mod.rs
@@ -9854,11 +9854,13 @@ impl<'a> Parser<'a> {
9854
Ok(DataType::AnyType)
9855
}
9856
Keyword::TABLE => {
9857
- if self.peek_token() != Token::LParen {
9858
- Ok(DataType::Table(None))
9859
- } 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 {
9860
let columns = self.parse_returns_table_columns()?;
9861
Ok(DataType::Table(Some(columns)))
9862
+ } else {
9863
+ Ok(DataType::Table(None))
9864
9865
9866
Keyword::SIGNED => {
0 commit comments