Skip to content

Evaluate setting max_limit_for_ann_queries during optimization pass - #73393

Merged
rschu1ze merged 10 commits into
ClickHouse:masterfrom
rschu1ze:max_limit_for_ann_queries
Dec 29, 2024
Merged

rschu1ze merged 10 commits into
ClickHouse:masterfrom
rschu1ze:max_limit_for_ann_queries

Conversation

@rschu1ze

@rschu1ze rschu1ze commented Dec 16, 2024 •

Copy link
Copy Markdown
Member

Addresses #71545 (comment)

Note for reviewer: I first needed to do some cleanups and refactorings. Suggest to check the commits one-by-one. Commit ae849ff (#73393) contains the actual changes.

@novikd

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

@robot-ch-test-poll1 robot-ch-test-poll1 added the pr-not-for-changelog This PR should not be mentioned in the changelog label Dec 16, 2024
@robot-ch-test-poll2

robot-ch-test-poll2 commented Dec 16, 2024 •

Copy link
Copy Markdown
Contributor

This is an automated comment for commit 9e0cb6a with description of existing statuses. It's updated for the latest CI running

❌ Click here to open a full report in a separate page

Check nameDescriptionStatus
Integration testsThe integration tests report. In parenthesis the package type is given, and in square brackets are the optional part/total tests❌ failure
Successful checks
Check nameDescriptionStatus
BuildsThere's no description for the check yet, please add it to tests/ci/ci_config.py:CHECK_DESCRIPTIONS✅ success
Docs checkBuilds and tests the documentation✅ success
Fast testNormally this is the first check that is ran for a PR. It builds ClickHouse and runs most of stateless functional tests, omitting some. If it fails, further checks are not started until it is fixed. Look at the report to see which tests fail, then reproduce the failure locally as described here✅ success
Flaky testsChecks if new added or modified tests are flaky by running them repeatedly, in parallel, with more randomization. Functional tests are run 100 times with address sanitizer, and additional randomization of thread scheduling. Integration tests are run up to 10 times. If at least once a new test has failed, or was too long, this check will be red. We don't allow flaky tests, read the doc✅ success
Stateful testsRuns stateful functional tests for ClickHouse binaries built in various configurations -- release, debug, with sanitizers, etc✅ success
Stateless testsRuns stateless functional tests for ClickHouse binaries built in various configurations -- release, debug, with sanitizers, etc✅ success
Style checkRuns a set of checks to keep the code style clean. If some of tests failed, see the related log from the report✅ success
Unit testsRuns the unit tests for different release types✅ success

@rschu1ze

This comment was marked as resolved.

@rschu1ze
rschu1ze force-pushed the max_limit_for_ann_queries branch from 00f1a63 to fb43114 Compare December 17, 2024 10:13
@jkartseva jkartseva self-assigned this Dec 18, 2024

@jkartseva jkartseva left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. Thanks for publishing refactoring changes in separate commits.

bool optimize_use_implicit_projections = false;
bool force_use_projection = false;
String force_projection_name;
size_t max_limit_for_ann_queries;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should there be a default initialization value? For example, 0 which ultimately disables the optimization?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good point. It seems weird to me that the other settings above are initialized at all. As far as I see, the code always callsQueryPlanOptimizationSettings::fromSettings which makes the implicit initialization pointless.

Let me check if I can refactor this a little bit. I'd do this separately though as people are waiting for this PR :)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Needed to merge from master anyways and fixed it ...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

--> #73693

@rschu1ze
rschu1ze added this pull request to the merge queue Dec 29, 2024
Merged via the queue into ClickHouse:master with commit 1501e4b Dec 29, 2024
@rschu1ze
rschu1ze deleted the max_limit_for_ann_queries branch December 29, 2024 17:47
@robot-ch-test-poll2 robot-ch-test-poll2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Dec 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-not-for-changelog This PR should not be mentioned in the changelog pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants