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 aggregate function as OVER window function #4978

Closed
xxchan opened this issue Aug 29, 2022 · 3 comments
Closed

Support aggregate function as OVER window function #4978

xxchan opened this issue Aug 29, 2022 · 3 comments
Assignees
Milestone

Comments

@xxchan
Copy link
Member

xxchan commented Aug 29, 2022

e.g., nexmark Q6

SELECT
    Q.seller,
    AVG(Q.final) OVER
        (PARTITION BY Q.seller ORDER BY Q.date_time ROWS BETWEEN 10 PRECEDING AND CURRENT ROW)
    as avg
FROM (
    SELECT MAX(B.price) AS final, A.seller, B.date_time
    FROM auction AS A, bid AS B
    WHERE A.id = B.auction and B.date_time between A.date_time and A.expires
    GROUP BY A.id, A.seller
) AS Q;

To support Grouping TopN #4847, we will first support special window functions row_numer() (or rank(), dense_rank()) only.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 5, 2022

This issue has been open for 60 days with no activity. Could you please update the status? Feel free to continue discussion or close as not planned.

@xxchan
Copy link
Member Author

xxchan commented Nov 5, 2022

risingwavelabs/rfcs#8

@stdrc
Copy link
Contributor

stdrc commented May 6, 2023

With #9110, #9248 and #9597 I guess we now support aggregating over window, though only for Emit-On-Window-Close mode. I'm closing this issue now, cuz later general version of over window executor is not really related to aggregate over window support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants