You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: change approx percentile/median UDFs to return floats (#21074)
## Which issue does this PR close?
- Closes#18092.
## Rationale for this change
1. Migrating to the modern TypeSignature API:
[264030c/datafusion/expr-common/src/signature.rs](https://github.com/apache/datafusion/blob/264030cca76d0bdb4d8809f252b422e72624a345/datafusion/expr-common/src/signature.rs)
2. Coercing types of `approx_percentile_cont`,
`approx_percentile_cont_with_weight`, `approx_median` to floats. It
matches PostgreSQL, DuckDB, and ClickHouse behaviour, except for Spark.
## What changes are included in this PR?
- Port remaining UDFs (approx_percentile_cont,
approx_percentile_cont_with_weight, approx_median, stub functions) to
signature APIs
- Deprecate INTEGERS and NUMERICS arrays in favour of using the
TypeSignature API
- They are not removed yet, but marked as deprecated to avoid breaking
downstream
- Fix up a SLT for approx_percentile_cont, approx_median to make sure it
returns a float
## Are these changes tested?
- Tests are passing
- Updated tests to expect floats in return types
## Are there any user-facing changes?
- Signatures of `approx_percentile_cont`,
`approx_percentile_cont_with_weight`, `approx_median` changed, so they
now return floats instead of integers (as seen in tests)
0 commit comments