Skip to content

Use system.completions table for suggestions#84694

Merged
yakov-olkhovskiy merged 9 commits intoClickHouse:masterfrom
RuS2m:master
Sep 28, 2025
Merged

Use system.completions table for suggestions#84694
yakov-olkhovskiy merged 9 commits intoClickHouse:masterfrom
RuS2m:master

Conversation

@RuS2m
Copy link
Copy Markdown
Contributor

@RuS2m RuS2m commented Jul 29, 2025

Changelog category (leave one):

  • Improvement

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

Client autocompletion is faster and more consistent by using system.completions rather than issuing multiple system-table queries.

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

@RuS2m RuS2m changed the title feat(suggestions): use system.completions table for suggestions Use system.completions table for suggestions Jul 29, 2025
@KochetovNicolai KochetovNicolai added the can be tested Allows running workflows for external contributors label Jul 30, 2025
@clickhouse-gh
Copy link
Copy Markdown
Contributor

clickhouse-gh bot commented Jul 30, 2025

Workflow [PR], commit [3560f7c]

Summary:

@clickhouse-gh clickhouse-gh bot added the pr-improvement Pull request with some product improvements label Jul 30, 2025
@yakov-olkhovskiy yakov-olkhovskiy self-assigned this Jul 30, 2025
@RuS2m RuS2m force-pushed the master branch 2 times, most recently from dc272d1 to eab4975 Compare July 30, 2025 12:26
@RuS2m RuS2m force-pushed the master branch 2 times, most recently from 39f548a to 42e3a3b Compare August 1, 2025 17:56
@RuS2m
Copy link
Copy Markdown
Contributor Author

RuS2m commented Aug 1, 2025

Tests failures seem unrelated to the code in the PR

@yakov-olkhovskiy
Copy link
Copy Markdown
Member

@RuS2m ...also it would be nice to have some integration test for this client and previous server having no system.completions table, and also this version

@RuS2m
Copy link
Copy Markdown
Contributor Author

RuS2m commented Aug 11, 2025

Both test failures seem to be unrelated to the changes made in the PR:

@RuS2m RuS2m requested a review from yakov-olkhovskiy August 21, 2025 14:06
@clickhouse-gh
Copy link
Copy Markdown
Contributor

clickhouse-gh bot commented Sep 23, 2025

Dear @yakov-olkhovskiy, this PR hasn't been updated for a while. You will be unassigned. Will you continue working on it? If so, please feel free to reassign yourself.

@yakov-olkhovskiy yakov-olkhovskiy added this pull request to the merge queue Sep 28, 2025
Merged via the queue into ClickHouse:master with commit 39c1463 Sep 28, 2025
123 checks passed
@robot-ch-test-poll1 robot-ch-test-poll1 added the pr-synced-to-cloud The PR is synced to the cloud repo label Sep 28, 2025
@rschu1ze
Copy link
Copy Markdown
Member

@RuS2m Can you please add a proper changelog entry, ClickHouse users will have no clue what Use system.completions table for suggestions means for them in practice.

CC: @yakov-olkhovskiy

@RuS2m
Copy link
Copy Markdown
Contributor Author

RuS2m commented Sep 29, 2025

@RuS2m Can you please add a proper changelog entry, ClickHouse users will have no clue what Use system.completions table for suggestions means for them in practice.

Just updated the entry, sorry for the churn and that the test turned out to be flaky. Potentially test_suggestions_backwards_compatibility_for_multiple_suggestions_prefix test can be dropped if it's okay with @yakov-olkhovskiy, as I presume the flakiness is coming from change in the suggestions logic, which makes regression tests on more vague autocompletion more challenging:

# In the new server suggestions logic exclude from suggestions aggregate function with "Null" combinator as well as other combinators with internal only usage
# https://github.com/ClickHouse/ClickHouse/blob/master/src/AggregateFunctions/Combinators/AggregateFunctionNull.cpp#L27

@azat
Copy link
Copy Markdown
Member

azat commented Sep 30, 2025

as I presume the flakiness is coming from change in the suggestions logic, which makes regression tests on more vague autocompletion more challenging

Hm, can you please elaborate? I'm not sure a I understood this. At first I was thinking that the test was flaky (here) due to it does not handle partial completion update by the client, but AFAICS it should works ok

@azat
Copy link
Copy Markdown
Member

azat commented Sep 30, 2025

@RuS2m this change got reverted (#87868), please resubmit it

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-improvement Pull request with some product improvements 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.

6 participants