MohamedAbdeen21 commented on code in PR #9599:
URL: https://github.com/apache/arrow-datafusion/pull/9599#discussion_r1523385958
##########
datafusion/sql/src/parser.rs:
##########
@@ -679,7 +679,25 @@ impl<'a> DFParser<'a> {
Keyword::PARTITIONED => {
self.parser.expect_keyword(Keyword::BY)?;
ensure_not_set(&builder.table_partition_cols,
"PARTITIONED BY")?;
- builder.table_partition_cols =
Some(self.parse_partitions()?);
+ let peeked = self.parser.peek_nth_token(2);
+ if peeked == Token::Comma || peeked == Token::RParen {
Review Comment:
Works fine but feels hacky. Considering replacing this `if` with a more
robust function that tries to apply a parsing rule and falls back (undo
consumed tokens) when rule fails.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]