remysaissy commented on code in PR #1687: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1687#discussion_r1934516332
########## src/parser/mod.rs: ########## @@ -4535,7 +4535,14 @@ impl<'a> Parser<'a> { self.expect_token(&Token::RParen)?; let return_type = if self.parse_keyword(Keyword::RETURNS) { - Some(self.parse_data_type()?) + if dialect_of!(self is PostgreSqlDialect | GenericDialect) + && self.parse_keyword(Keyword::TABLE) + { + let columns = self.parse_parenthesized_columns()?; + Some(DataType::Table(columns)) + } else { + Some(self.parse_data_type()?) Review Comment: Yes sure, I was not sure that adding it to the parse_data_type() would not have side effects on other parts of the parser as the function is generic and not focused only on the function case. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org