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


##########
src/parser/mod.rs:
##########
@@ -2050,14 +2052,9 @@ impl<'a> Parser<'a> {
                         })?;
 
                         match expr {
-                            // If we get back a compound field access or 
identifier,
-                            // we flatten the nested expression.
-                            // For example if the current root is `foo`
-                            // and we get back a compound identifier 
expression `bar.baz`
-                            // The full expression should be `foo.bar.baz` 
(i.e.
-                            // a root with an access chain with 2 entries) and 
not
-                            // `foo.(bar.baz)` (i.e. a root with an access 
chain with
-                            // 1 entry`).
+                            // `parse_prefix` does not itself follow compound 
chains, but a
+                            // dialect override could still return a compound 
expression, so
+                            // keep the flatten arms for safety.

Review Comment:
   The new comment should be more complete.



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