LucaCappelletti94 commented on code in PR #2834:
URL:
https://github.com/apache/datafusion-sqlparser-rs/pull/2834#discussion_r4658328819
##########
src/parser/mod.rs:
##########
@@ -980,6 +981,17 @@ impl<'a> Parser<'a> {
Token::Word(w) if w.keyword == Keyword::COLUMN => {
(CommentObject::Column, self.parse_object_name(false)?)
}
+ Token::Word(w) if w.keyword == Keyword::CONSTRAINT => {
+ let name = ObjectName::from(vec![self.parse_identifier()?]);
+ self.expect_keyword_is(Keyword::ON)?;
+ let object_type = if self.parse_keyword(Keyword::DOMAIN) {
Review Comment:
`DOMAIN` followed by `IS` or `.` is now read as the table name, so `COMMENT
ON CONSTRAINT c ON domain IS 'x'` and `COMMENT ON CONSTRAINT c ON domain.t IS
'x'` parse as table constraints, plus I added the necessary tests.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]