Skip to content

Add system.stemmers - #100611

Merged
rschu1ze merged 38 commits into
ClickHouse:masterfrom
Ergus:stemmer_table
Jun 24, 2026
Merged

rschu1ze merged 38 commits into
ClickHouse:masterfrom
Ergus:stemmer_table

Conversation

@Ergus

@Ergus Ergus commented Mar 24, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • New Feature

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

Added system table system.stemmers which shows all available stemmers languages that can be specified for the stem function.

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

Version info

  • Merged into: 26.7.1.31

@Ergus
Ergus requested a review from Copilot March 24, 2026 14:43
@clickhouse-gh

clickhouse-gh Bot commented Mar 24, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [0401257]

Summary: ✅


AI Review

Summary

The PR adds the system.stemmers system table, documents its build-time availability, links it from the stem function documentation, and adds a stateless coverage query for the exposed identifiers. The current revision addresses the prior review concerns I could verify: docs frontmatter and anchors are present, the libstemmer availability note is explicit, the example output is marked as truncated, the stem language argument wording no longer claims only ISO-639-1 codes, and the new table has focused test coverage.

Final Verdict

Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added the pr-improvement Pull request with some product improvements label Mar 24, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a new system.stemmers system table to expose the list of available libstemmer stemmers (languages/aliases) that can be used with the stem() NLP function.

Changes:

  • Registers system.stemmers in system table attachment (guarded by USE_NLP).
  • Implements StorageSystemStemmers to enumerate available stemmers via sb_stemmer_list().
  • Adds user documentation for system.stemmers.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/Storages/System/attachSystemTables.cpp Conditionally attaches the new system.stemmers table when USE_NLP is enabled.
src/Storages/System/StorageSystemStemmers.h Declares the new system storage for listing stemmers.
src/Storages/System/StorageSystemStemmers.cpp Implements the table by reading stemmer names from libstemmer.
src/Storages/System/CMakeLists.txt Excludes StorageSystemStemmers.cpp if the stemmer contrib target isn’t available.
docs/en/operations/system-tables/stemmers.md Documents the new system.stemmers system table and provides an example query/output.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Comment on lines +15 to +16
Shows all available stemmers.
These can be used in the function [stem](../../sql-reference/functions/nlp-functions.md).

Copilot AI Mar 24, 2026

Copy link

Choose a reason for hiding this comment

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

The docs don't mention that querying system.stemmers is blocked unless allow_experimental_nlp_functions=1 (the table throws SUPPORT_IS_DISABLED). Also, the listed values come from sb_stemmer_list() (e.g. english, porter), which may not match the stem() function docs that describe ISO-639-1 codes—please clarify in this page what exact identifiers the name column contains and how to use them with stem().

Copilot uses AI. Check for mistakes.
@rschu1ze rschu1ze self-assigned this Apr 1, 2026

@rschu1ze rschu1ze 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.

@Ergus This PR is based on a baroque master version, could you merge from upstream please?

Comment thread src/Storages/System/CMakeLists.txt Resolved
Comment thread src/Functions/stem.cpp Resolved
@rschu1ze rschu1ze changed the title Add system.stemmers Add system.stemmers Apr 1, 2026
@alexey-milovidov

This comment was marked as resolved.

@rschu1ze

This comment was marked as resolved.

`aspell-dict.txt` was deleted in master along with the `aspell` and
`codespell` style checks. Removing the file here so the PR can merge
cleanly without a modify/delete conflict.
@clickhouse-gh

clickhouse-gh Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Dear @rschu1ze, you haven't been active on this PR for 30 days. You will be unassigned. Will you continue working on it? If so, please feel free to reassign yourself.

@clickhouse-gh clickhouse-gh Bot assigned rschu1ze and unassigned rschu1ze Jun 1, 2026
@clickhouse-gh

clickhouse-gh Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 85.40% 85.30% -0.10%
Functions 92.50% 92.50% +0.00%
Branches 77.60% 77.50% -0.10%

Changed lines: Changed C/C++ lines covered by tests: 29/29 (100.00%) | Lost baseline coverage: none · Uncovered code

Full report · Diff report

@rschu1ze
rschu1ze added this pull request to the merge queue Jun 24, 2026
Merged via the queue into ClickHouse:master with commit e57e219 Jun 24, 2026
167 checks passed
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Jun 24, 2026
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
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 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.

5 participants