You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "ntjohnson1 (via GitHub)" <gi...@apache.org> on 2026/05/28 15:44:24 UTC

Re: [PR] feat: accept distinct kwarg on sum and avg [datafusion-python]

ntjohnson1 commented on code in PR #1556:
URL: https://github.com/apache/datafusion-python/pull/1556#discussion_r3318972757


##########
docs/source/user-guide/upgrade-guides.rst:
##########
@@ -18,6 +18,29 @@
 Upgrade Guides
 ==============
 
+DataFusion 54.0.0
+-----------------
+
+The aggregate functions :py:func:`~datafusion.functions.sum` and
+:py:func:`~datafusion.functions.avg` now accept a ``distinct`` argument, matching
+the other aggregate functions. ``distinct`` is inserted *before* ``filter`` in the
+argument list, so any code that passed ``filter`` positionally must be updated to
+pass it as a keyword argument.

Review Comment:
   I suspect some people will see the type error first before finding the detail OR if they see this I would be curious if my existing guard rails would catch it.
   ```suggestion
   pass it as a keyword argument. The types are distinct so a type checker should flag this.
   ```



-- 
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