iffyio commented on code in PR #1535:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/1535#discussion_r1855132514


##########
src/parser/mod.rs:
##########
@@ -1224,6 +1224,17 @@ impl<'a> Parser<'a> {
                             body: Box::new(self.parse_expr()?),
                         }));
                     }
+                    Token::DoubleColon if self.dialect.supports_methods() => {
+                        let namespace = w.value;
+                        self.expect_token(&Token::DoubleColon)?;
+                        let name_with_namespace = match 
self.next_token().token {
+                            Token::Word(func_name) => {
+                                ObjectName(vec![Ident::new(format!("{}::{}", 
namespace, func_name.value))])
+                            },
+                            _ => return self.expected("identifier", 
self.peek_token())
+                        };
+                        Ok(self.parse_function(name_with_namespace)?)

Review Comment:
   Can we move the body to a `self.parse_namespaced_method(w)?` or similar 
function? Also if we can add an example syntax to the function doc with the 
link to clarify the syntax



##########
tests/sqlparser_common.rs:
##########
@@ -11550,6 +11550,14 @@ fn parse_method_expr() {
         }
         _ => unreachable!(),
     }
+
+    dialects.verified_stmt(

Review Comment:
   Can we add a scenario in the style of `a::b::c().d()`?



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to