sabir-akhadov-localstack commented on code in PR #2484:
URL:
https://github.com/apache/datafusion-sqlparser-rs/pull/2484#discussion_r4325167363
##########
src/ast/spans.rs:
##########
@@ -2216,6 +2216,7 @@ impl Spanned for FunctionArg {
arg,
operator: _,
} => name.span().union(&arg.span()),
+ FunctionArg::Variadic(arg) => arg.span(),
Review Comment:
This span starts at the operand, so for `SELECT f(VARIADIC a, b)` the "must
be the last function argument" error points at `a` rather than at `VARIADIC`;
capturing the keyword's span (or using `self.peek_token_ref().span.start` in
the position check) would put it on the marker.
--
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]