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

[window function] support min max with self define sliding window. #4603

Closed
Ted-Jiang opened this issue Dec 13, 2022 · 3 comments · Fixed by #4675
Closed

[window function] support min max with self define sliding window. #4603

Ted-Jiang opened this issue Dec 13, 2022 · 3 comments · Fixed by #4675
Assignees
Labels
enhancement New feature or request

Comments

@Ted-Jiang
Copy link
Member

Ted-Jiang commented Dec 13, 2022

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
(This section helps Arrow developers understand the context and why for this feature, in addition to the what)
Now run

 SELECT s_suppkey, s_nationkey, s_acctbal, (max(s_acctbal) over (
                               ORDER BY s_acctbal DESC ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING)) wr
   FROM supplier

limit 10;
ArrowError(ExternalError(Internal("Retract should be implemented for aggregate functions when used with custom window frame queries")))

Got error because of min, max accumulator not support retract_batch

https://github.com/alamb/arrow-datafusion/blob/394c5eebf0cfb080698485bd32a8d2fb2230fb80/datafusion/expr/src/accumulator.rs#L61

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

@Ted-Jiang Ted-Jiang added the enhancement New feature or request label Dec 13, 2022
@Ted-Jiang Ted-Jiang self-assigned this Dec 13, 2022
@Ted-Jiang
Copy link
Member Author

I will file a pr tommorow.

@alamb
Copy link
Contributor

alamb commented Dec 13, 2022

cc @metesynnada @retikulum

@metesynnada
Copy link
Contributor

cc @mustafasrepo

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