You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "LucaCappelletti94 (via GitHub)" <gi...@apache.org> on 2026/09/03 20:12:25 UTC
[PR] `PostgreSQL`: Support the `VARIADIC` function call argument marker [datafusion-sqlparser-rs]
LucaCappelletti94 opened a new pull request, #2484:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2484
`PostgreSqlDialect` could not parse the `VARIADIC` argument marker in a function call, in any position:
```rust
Parser::parse_sql(&PostgreSqlDialect {}, "SELECT concat(VARIADIC a)");
// Err: sql parser error: Expected: ), found: a at Line: 1, Column: 24
```
The marker is added as `FunctionArg::Variadic`. Parsing is gated on `Dialect::supports_variadic_function_argument`, enabled for `PostgreSQL` and the generic dialect.
As in `PostgreSQL`, the marker is rejected on a wildcard operand, in combination with `DISTINCT` or `ALL`, and on any but the final argument.
--
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
Re: [PR] `PostgreSQL`: Support the `VARIADIC` function call argument marker [datafusion-sqlparser-rs]
Posted by "LucaCappelletti94 (via GitHub)" <gi...@apache.org>.
LucaCappelletti94 commented on code in PR #2484:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2484#discussion_r4328106454
##########
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:
Fixed it, but span really is a mess of its own and we'll have to handle it some time after the tokenizer refactoring. Thanks for pointing this one out.
--
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
Re: [PR] `PostgreSQL`: Support the `VARIADIC` function call argument marker [datafusion-sqlparser-rs]
Posted by "sabir-akhadov-localstack (via GitHub)" <gi...@apache.org>.
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: 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
Re: [PR] `PostgreSQL`: Support the `VARIADIC` function call argument marker [datafusion-sqlparser-rs]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #2484:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2484#issuecomment-5956284337
## [Codecov](https://app.codecov.io/gh/apache/datafusion-sqlparser-rs/pull/2484?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:x: Patch coverage is `88.88889%` with `10 lines` in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 81.16%. Comparing base ([`bfc7d38`](https://app.codecov.io/gh/apache/datafusion-sqlparser-rs/commit/bfc7d388bfa8ae84d4d29b5f8798867e1f496342?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`94a4362`](https://app.codecov.io/gh/apache/datafusion-sqlparser-rs/commit/94a43624f38365e0bbdd10fc858f154b8c384f0f?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 7 commits behind head on main.
| [Files with missing lines](https://app.codecov.io/gh/apache/datafusion-sqlparser-rs/pull/2484?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [src/parser/mod.rs](https://app.codecov.io/gh/apache/datafusion-sqlparser-rs/pull/2484?src=pr&el=tree&filepath=src%2Fparser%2Fmod.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL3BhcnNlci9tb2QucnM=) | 86.84% | [2 Missing and 8 partials :warning: ](https://app.codecov.io/gh/apache/datafusion-sqlparser-rs/pull/2484?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## main #2484 +/- ##
==========================================
+ Coverage 81.09% 81.16% +0.06%
==========================================
Files 42 42
Lines 33682 33813 +131
Branches 33682 33813 +131
==========================================
+ Hits 27316 27444 +128
- Misses 2796 2802 +6
+ Partials 3570 3567 -3
```
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/datafusion-sqlparser-rs/pull/2484?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
</details>
--
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