Nyrox commented on issue #1563: URL: https://github.com/apache/datafusion-sqlparser-rs/issues/1563#issuecomment-2586942739
> /edit to add: I guess it's because `Spanned for Value` is not implemented yet. But even if it were, I'm not sure the function span will cover all the text until the closing brace, since it's just union'ing the spans of the parsed elements, which wouldn't include the braces...? I have a feeling `Spanned for FunctionArguments` needs to be extended to the open and closing braces in the List and Subquery case. [<img alt="" width="16" height="16" src="https://avatars.githubusercontent.com/u/7643957?s=64&u=f6bc582a61a82d2f35134121d42beef484bd2162&v=4">@Nyrox](https://github.com/Nyrox) wdyt? @graup Yes you are right. There is a lot of missing cases like these. For FunctionArgumentList, adding the parenthesis as [AttachedToken](https://docs.rs/sqlparser/0.53.0/sqlparser/ast/helpers/attached_token/struct.AttachedToken.html) would be straight forward and should be done. I never quite figured out what the best to do it for enum tuple variants like Subquery is though. > So for CURRENT_DATE('UTC'), the ast node for the Function expr has a span containing only CURRENT_DATE (and func.args has an empty span). I'd expect the function expr span to cover the whole expression including the parentheses. Yeah this is definitely the Span for Value missing. Getting that in is pretty high priority imo. Not sure if the best way here is to actually implemented Spanned for every Value or to wrap every usage of value in a WithSpan<T> like wrapper. Both are unfortunately quite breaking changes. -- 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