apache / datafusion-python

Apache DataFusion Python Bindings
https://datafusion.apache.org/python
Apache License 2.0
355 stars 70 forks source link

Tsaucer/find window fn #747

Closed timsaucer closed 2 months ago

timsaucer commented 3 months ago

Which issue does this PR close?

Closes #730.

Rationale for this change

The current fix is a work around for the sum function. We have hard coded it to use the aggregate sum function as the built in function is removed. With this change, we can remove all other built in window functions without having to similarly encode work arounds.

What changes are included in this PR?

This change will add a search order to attempt to find the correct function, by first looking through all registered window functions, then registered aggregate functions, then default aggregate functions, and finally the built in window functions.

Are there any user-facing changes?

None.