Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support sliding windows in AggregateUDF / User Defined Window Functions #6611

Closed
alamb opened this issue Jun 9, 2023 · 4 comments · Fixed by #6671
Closed

Support sliding windows in AggregateUDF / User Defined Window Functions #6611

alamb opened this issue Jun 9, 2023 · 4 comments · Fixed by #6671
Assignees
Labels
enhancement New feature or request

Comments

@alamb
Copy link
Contributor

alamb commented Jun 9, 2023

Is your feature request related to a problem or challenge?

When implementing an user defined aggregator via AggregateUDF, it is not possible to use the retract_batch API to incrementally update aggregate functions used as window functions

Describe the solution you'd like

I would like to extend somehow so user defined aggregate functions can take advantage of retract_batch

Ideally:

  1. Implement the code
  2. Update / add an end to end example showing how to use this API -- the existing example is https://github.com/apache/arrow-datafusion/blob/main/datafusion-examples/examples/simple_udaf.rs

Describe alternatives you've considered

No response

Additional context

@stuartcarnie found this gap while working on functionality for IOx

@alamb
Copy link
Contributor Author

alamb commented Jun 14, 2023

@alamb
Copy link
Contributor Author

alamb commented Jun 14, 2023

I am starting to work on this (based on @stuartcarnie 's work)

@alamb
Copy link
Contributor Author

alamb commented Jun 14, 2023

Here is a PR with some tests: #6669

@alamb
Copy link
Contributor Author

alamb commented Jun 14, 2023

Here is a PR that builds on the one above with the code to implement the feature (based on @stuartcarnie 's changes): #6671

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant