apache / apache/datafusion

Explore Updating VariadicAny Signature to take 0 Args

Open
#11,522 3 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
9.3k
Forks
2.4k
Avg merge
3d 7h
Merged PRs (30d)
344

Description

### Is your feature request related to a problem or challenge?

Currently `VariadicAny` represents 1 or more arguments, but given the name and seemingly intention, it seems like 0 or more would make more sense (though there a number of counter examples).

See https://github.com/apache/datafusion/pull/11229/files#r1680888279 for more discussion.

### Describe the solution you'd like

`VariadicAny` is updated to support 0 arguments.

### Describe alternatives you've considered

See the linked discussion for a few alternatives. It's unclear if `VariadicAny` w/ 0 args is the best option here, but was an issue implementing `COUNT()`.

### Additional context

https://github.com/apache/datafusion/blob/b0925c801e1c07bd78c78b045ab58fbd0630b638/datafusion/expr/src/signature.rs#L100-L101

Contributor guide

Open the contributing guide

Research direction

Start with the VariadicAny definition in datafusion/expr/src/signature.rs and read the linked discussion and pull request comments for the alternative designs. Determine whether accepting zero arguments is the intended resolution for the COUNT() implementation, then verify the affected behavior and tests before considering the issue done.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.