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

sql: Rework top N window functions. #136

Merged
merged 2 commits into from
May 26, 2023

Conversation

jacksonrnewhouse
Copy link
Contributor

This allows users to sort window functions in the SlidingTopN case, so queries like

SELECT * FROM (
SELECT ROW_NUMBER() OVER (
    PARTITION BY window
    ORDER BY count DESC, auction) as row_num, *
FROM (SELECT count(*) as count,
    bid.auction as auction,
    hop(interval '5 seconds', interval '15 seconds') as window
        FROM nexmark
        group by 2,3)) WHERE row_num < 2

I also added a clone to some of the partial aggregate code, so that you can aggregate strings, like bid.extra.

@jacksonrnewhouse jacksonrnewhouse changed the base branch from full_pipeline_test to master May 25, 2023 18:50
@jacksonrnewhouse jacksonrnewhouse force-pushed the refactor/rework_sort_tuples branch from 98bd939 to f92bbc5 Compare May 25, 2023 19:07
@jacksonrnewhouse jacksonrnewhouse marked this pull request as ready for review May 25, 2023 19:07
@jacksonrnewhouse jacksonrnewhouse merged commit d1b4023 into master May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants