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

Resurrect indexHint function. #21304

Merged
merged 1 commit into from
Apr 21, 2021
Merged

Conversation

amosbird
Copy link
Collaborator

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

Changelog category (leave one):

  • New Feature

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

Add back indexHint function. This is for #21238 . This reverts #9542 . This fixes #9540 .

Detailed description / Documentation draft:

.

@amosbird
Copy link
Collaborator Author

amosbird commented Mar 4, 2021

Integration tests (thread) — fail: 1, passed: 1040, error: 24

E           Code: 159. DB::Exception: Received from 172.19.0.6:9000. DB::Exception: Watching task /clickhouse/task_queue/ddl/query-0000000017 is executing longer than distributed_ddl_task_timeout (=180) seconds. There are 1 unfinished hosts (0 of them are currently active), they are going to execute the query in background. Stack trace:

@nikitamikhaylov
Copy link
Member

Maybe also add some test case from linked issue?

Comment on lines +1 to +8
0 0 0
0 1 0
Copy link
Collaborator

Choose a reason for hiding this comment

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

@amosbird but why it returns the first row too for select * from tbl WHERE indexHint(t = 1) order by t with index_granularity=1?

P.S. it worth converting this test to use -- { echo } test hint, see https://github.com/ClickHouse/ClickHouse/blob/master/tests/queries/0_stateless/01564_test_hint_woes.sql for example

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

but why it returns the first row too for select * from tbl WHERE indexHint(t = 1) order by t with index_granularity=1

It's how primary index work in clickhouse. The current granule starts with value 1 doesn't mean all values in previous granule < 1

@amosbird
Copy link
Collaborator Author

Maybe also add some test case from linked issue?

Sure. Tests are added.

@nikitamikhaylov nikitamikhaylov merged commit d4e8f96 into ClickHouse:master Apr 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-feature Pull request with new product feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

indexHint is broken
4 participants