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

Fix DISTINCT with LIMIT in distributed queries #38371

Merged
merged 1 commit into from Jun 29, 2022

Conversation

CurtizJ
Copy link
Member

@CurtizJ CurtizJ commented Jun 24, 2022

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in official stable or prestable release)

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

Fix incorrect result of distributed queries with DISTINCT and LIMIT. Fixes #38282.

@robot-clickhouse robot-clickhouse added the pr-bugfix Pull request with bugfix, not backported by default label Jun 24, 2022
@KochetovNicolai KochetovNicolai self-assigned this Jun 24, 2022
@KochetovNicolai
Copy link
Member

@nickitat I think it would be better to move pre-distinct and pre-limit optimizations to query-plan level. Limit should probably already work fine.

@devcrafter
Copy link
Member

Why don't do it here in the way proposed by @KochetovNicolai ?

@KochetovNicolai
Copy link
Member

It is better to have a small independent bugfix. It is backportable.

@CurtizJ
Copy link
Member Author

CurtizJ commented Jun 29, 2022

Stateless tests (release, DatabaseReplicated, actions): tests failed to start.

@CurtizJ CurtizJ merged commit e78814f into ClickHouse:master Jun 29, 2022
@filimonov
Copy link
Contributor

Backport?

@CurtizJ CurtizJ added the pr-must-backport Pull request should be backported intentionally. Use this label with great care! label Jun 30, 2022
robot-clickhouse pushed a commit that referenced this pull request Jul 1, 2022
robot-clickhouse pushed a commit that referenced this pull request Jul 1, 2022
robot-clickhouse pushed a commit that referenced this pull request Jul 1, 2022
robot-clickhouse pushed a commit that referenced this pull request Jul 1, 2022
robot-clickhouse pushed a commit that referenced this pull request Jul 1, 2022
CurtizJ added a commit that referenced this pull request Jul 3, 2022
Backport #38371 to 22.5: Fix `DISTINCT` with `LIMIT` in distributed queries
CurtizJ added a commit that referenced this pull request Jul 3, 2022
Backport #38371 to 22.6: Fix `DISTINCT` with `LIMIT` in distributed queries
CurtizJ added a commit that referenced this pull request Jul 3, 2022
Backport #38371 to 22.4: Fix `DISTINCT` with `LIMIT` in distributed queries
CurtizJ added a commit that referenced this pull request Jul 3, 2022
Backport #38371 to 22.3: Fix `DISTINCT` with `LIMIT` in distributed queries
CurtizJ added a commit that referenced this pull request Jul 4, 2022
Backport #38371 to 21.8: Fix `DISTINCT` with `LIMIT` in distributed queries
@Felixoid Felixoid added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore pr-bugfix Pull request with bugfix, not backported by default pr-must-backport Pull request should be backported intentionally. Use this label with great care!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

incorrect result: distinct + distributed + limit
6 participants