alamb commented on code in PR #9599:
URL: https://github.com/apache/arrow-datafusion/pull/9599#discussion_r1544606886


##########
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 think you can use the poorly named `consume_tokens` API:
   
   
https://docs.rs/sqlparser/latest/sqlparser/parser/struct.Parser.html#method.consume_tokens



-- 
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]

Reply via email to