You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "iffyio (via GitHub)" <gi...@apache.org> on 2025/05/02 03:13:13 UTC

Re: [PR] Resolved bug in `parse_function_arg` [datafusion-sqlparser-rs]

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


##########
src/parser/mod.rs:
##########
@@ -5199,13 +5199,20 @@ impl<'a> Parser<'a> {
 
         // parse: [ argname ] argtype
         let mut name = None;
+        let next_token = self.peek_token();

Review Comment:
   > The code you proposed does not work as Int2 (or any analogous such type) does not fall in if let DataType::Custom(n, _) = &data_type {
   
   Oh how did you mean here by `Int2` in this example not being parsed as a custom datatype, do we get back a different type or does `parse_data_type` fail in that scenario?
   
   I think ideally we will want to do without this `self.peek_token()` to avoid the cloning that it includes



-- 
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-unsubscribe@datafusion.apache.org

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


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