LucaCappelletti94 commented on code in PR #2062:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/2062#discussion_r2419647836


##########
src/parser/mod.rs:
##########
@@ -7929,22 +7929,22 @@ impl<'a> Parser<'a> {
         loop {
             if self.parse_keyword(Keyword::CONSTRAINT) {
                 let name = Some(self.parse_identifier()?);
-                if let Some(option) = self.parse_optional_column_option()? {
+                if let Some(option) = 
self.parse_optional_column_option(&col_name)? {

Review Comment:
   It is needed to standardize `ForeignKeyConstraint` and avoid having a 
duplicated struct to represent the same type of concept. I could possibly leave 
the `columns` vector of the `ForeignKeyConstraint` empty, but when I use that 
struct in code that works on top of the AST it is quite useful to have the 
column ident defined there, and not have to handle the case of a special 
`ForeignKeyConstraint`.



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

Reply via email to