andygrove commented on code in PR #4126:
URL: https://github.com/apache/arrow-datafusion/pull/4126#discussion_r1016005713
##########
datafusion/sql/src/parser.rs:
##########
@@ -381,6 +391,37 @@ impl<'a> DFParser<'a> {
}
}
+ fn parse_has_options(&mut self) -> bool {
+ self.consume_token(&Token::make_keyword("OPTIONS"))
+ }
+
+ //
+ fn parse_options(&mut self) -> Result<HashMap<String, String>,
ParserError> {
+ let mut options: HashMap<String, String> = HashMap::new();
+ if !self.parser.consume_token(&Token::LParen)
+ || self.parser.consume_token(&Token::RParen)
+ {
+ return Ok(options);
+ }
Review Comment:
I think we need to return an error if we see `OPTIONS` that isn't followed
by `(`?
```suggestion
self.parser.expect_token(&Token::LParen)?;
```
--
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]