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 new window function ntile #46256

Merged
merged 6 commits into from
Feb 15, 2023
Merged

Conversation

lgbo-ustc
Copy link
Contributor

@lgbo-ustc lgbo-ustc commented Feb 10, 2023

Changelog category (leave one):

  • New Feature

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):

...
Support window function ntile.

insert into test_data values(1,2), (1,3), (1,4), (2,5),(2,6);
select a, b, ntile(2) over (partition by a order by b rows between unbounded preceding and unbounded following ) from test_data;

┌─a─┬─b─┬─ntile(2) OVER (PARTITION BY a ORDER BY b ASC)─┐
│ 1 │ 2 │                                             1 │
│ 1 │ 3 │                                             1 │
│ 1 │ 4 │                                             2 │
│ 2 │ 5 │                                             1 │
│ 2 │ 6 │                                             2 │
└───┴───┴───────────────────────────────────────────────┘

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

Information about CI checks: https://clickhouse.com/docs/en/development/continuous-integration/

@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added the pr-feature Pull request with new product feature label Feb 10, 2023
@lgbo-ustc
Copy link
Contributor Author

There is a related issue, #28989

@lgbo-ustc lgbo-ustc force-pushed the window_functions branch 3 times, most recently from faccd58 to 9c66561 Compare February 10, 2023 06:20
@ucasfl ucasfl added the can be tested Allows running workflows for external contributors label Feb 10, 2023
@lgbo-ustc lgbo-ustc marked this pull request as ready for review February 10, 2023 06:49
@vdimir vdimir self-assigned this Feb 10, 2023
@lgbo-ustc lgbo-ustc force-pushed the window_functions branch 3 times, most recently from bcb1be1 to 1862702 Compare February 13, 2023 06:10
@lgbo-ustc lgbo-ustc marked this pull request as draft February 13, 2023 09:42
@lgbo-ustc lgbo-ustc marked this pull request as ready for review February 14, 2023 06:40
change window specification as (partition by a order by b rows between unbounded preceding and unbounded following)
Copy link
Member

@vdimir vdimir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for making an effort to support this window function!

@vdimir vdimir merged commit 3e77463 into ClickHouse:master Feb 15, 2023
@alexey-milovidov
Copy link
Member

#46763

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
can be tested Allows running workflows for external contributors pr-feature Pull request with new product feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants