iffyio commented on code in PR #2062:
URL:
https://github.com/apache/datafusion-sqlparser-rs/pull/2062#discussion_r2422747953
##########
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:
I see, the goal of the AST is to represent the syntax as closely as possible
so that I don't think that storing the column name in another node in the tree
than where it was found seems reasonable. haven't looked closely at the
different foreign key constraint variants but I would assume that if both
variants show up in different parts of the syntax then its not unreasonable
that they are represented differently
--
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]