MohamedAbdeen21 commented on code in PR #9599:
URL: https://github.com/apache/arrow-datafusion/pull/9599#discussion_r1536628285
##########
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:
I'm not super familiar with sqlparser crate, but I don't think it allows
rewinding tokens, we will have to implement a parsing rule that only uses
peeks, which sounds really unnecessary. Will add a comment for now and maybe
can find a better way.
--
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]