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: accept distinct kwarg on sum and avg (#1556)
* feat: accept distinct kwarg on sum and avg
Upstream exposes `sum_distinct` / `avg_distinct` / `count_distinct` as
sibling functions that call the same underlying UDAF with
`distinct: bool = true`. The Rust binding side already routes
`distinct=Some(true)` through the aggregate builder for `sum`, `avg`,
and `count` — but only `count` exposed the kwarg on the Python wrapper.
Add `distinct: bool = False` to `sum()` and `avg()` mirroring the
existing `count()` signature, and update SKILL.md so the check-upstream
audit does not re-flag the three upstream `*_distinct` shortcuts as
gaps. The plan emitted by `sum(col, distinct=True)` matches what
upstream's `sum_distinct(col)` builds.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* test: fold sum/avg distinct tests into parameterized aggregation test
Move the standalone test_sum_distinct_kwarg and test_avg_distinct_kwarg
from test_functions.py into the existing test_aggregation::test_aggregation
parameterization, matching how distinct is already covered for median,
array_agg, count, and bit_xor.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* docs: clarify distinct kwarg on sum and avg
Drop the unhelpful "upstream avg_distinct/sum_distinct shortcut"
reference in favor of describing the actual behavior.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* docs: note sum/avg distinct argument-order breaking change
distinct is inserted before filter on sum and avg for consistency with
the other aggregate functions, breaking positional filter callers. Add a
DataFusion 54.0.0 upgrade-guide entry covering the migration.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Update docs/source/user-guide/upgrade-guides.rst
Co-authored-by: Nick <24689722+ntjohnson1@users.noreply.github.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Nick <24689722+ntjohnson1@users.noreply.github.com>
0 commit comments