apache / apache/datafusion

Support column reference as percentile arg for `percentile_cont` and `approx_percentile_cont`

Open
#24,337 3 comments 1 reaction 1 assignee Claimed by @dd-annarose 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?

`percentile_cont` and `approx_percentile_cont` only accept a literal for the percentile argument (see [here](https://github.com/apache/datafusion/blob/main/datafusion/functions-aggregate/src/utils.rs#L44)).

We could extend support for column reference or projections as well.

### Describe the solution you'd like

Add support for `ColumnarValue::Array` for both `percentile_cont` and `approx_percentile_cont`.

### Describe alternatives you've considered

_No response_

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.