barsela1 commented on code in PR #1799: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1799#discussion_r2036691068
########## src/parser/mod.rs: ########## @@ -11823,7 +11828,16 @@ impl<'a> Parser<'a> { } _ => break, }; - let relation = self.parse_table_factor()?; + let mut relation = self.parse_table_factor()?; + + if self.is_next_token_a_join() { + let joins = self.parse_joins()?; + relation = TableFactor::NestedJoin { + table_with_joins: Box::new(TableWithJoins { relation, joins }), + alias: None, + }; + } Review Comment: I’m not sure this approach is correct...test_join() test fails. In parse_table_and_joins, there's an initial call to parse_table_factor that is unrelated to join parsing. With this implementation, the first table will always be parsed as a NestedJoin, even when it shouldn’t be. I tried to handle nested joins explicitly within the join logic to avoid that -- 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