Skip to content

fix(clickHouse): show CPS aggregate and i18n for RATIO/VARIANCE/STDDEV - #2183

Merged
jsers merged 1 commit into
mainfrom
fix-ck-cps-i18n-0715
Jul 15, 2026
Merged

fix(clickHouse): show CPS aggregate and i18n for RATIO/VARIANCE/STDDEV#2183
jsers merged 1 commit into
mainfrom
fix-ck-cps-i18n-0715

Conversation

@pioneerlfn

@pioneerlfn pioneerlfn commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add CPS to ClickHouse QueryBuilder AGGREGATE_FUNCTION_TYPE_MAP so it appears in the aggregate dropdown (aligned with Doris).
  • Add missing locale strings for RATIO / VARIANCE / STDDEV across zh_CN, zh_HK, en_US, ja_JP, ru_RU (fixes raw i18n keys in the UI).

Review

  • /cmt strict + /fc-cr (TS/i18n): blocker=0; map keys verified present in all 5 locales.

Verification

  • Locale/map key alignment script: all 13 aggregate keys covered in all locales.
  • Manual: refresh CK log explorer aggregate dropdown — expect CPS 每秒计数 and localized RATIO/VARIANCE/STDDEV.

Notes/Risks

  • Backend already supports variance/stddev/cps; this is FE surface + copy only.

Made with Cursor

Summary by CodeRabbit

  • New Features
    • Added Ratio, Variance, and Standard Deviation aggregation options to the ClickHouse query builder.
    • Added support for the CPS aggregate function.
    • Added localized labels for the new aggregation options in English, Japanese, Russian, Simplified Chinese, and Traditional Chinese.

@jsers
jsers merged commit 7a23c99 into main Jul 15, 2026
1 check was pending
@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5c9190e7-b056-4fa8-ae8e-6d40e0843439

📥 Commits

Reviewing files that changed from the base of the PR and between 0935f0e and 24a81a1.

📒 Files selected for processing (6)
  • src/plugins/clickHouse/ExplorerNG/components/QueryBuilder/constants.ts
  • src/plugins/clickHouse/locale/en_US.ts
  • src/plugins/clickHouse/locale/ja_JP.ts
  • src/plugins/clickHouse/locale/ru_RU.ts
  • src/plugins/clickHouse/locale/zh_CN.ts
  • src/plugins/clickHouse/locale/zh_HK.ts

📝 Walkthrough

Walkthrough

The ClickHouse query builder adds CPS to the filterable aggregate type map and adds RATIO, VARIANCE, and STDDEV labels to five locale files.

Changes

ClickHouse aggregate options

Layer / File(s) Summary
Aggregate support and localization
src/plugins/clickHouse/ExplorerNG/components/QueryBuilder/constants.ts, src/plugins/clickHouse/locale/*
CPS maps to FILTERABLE_TYPES, and localized aggregate labels are added for RATIO, VARIANCE, and STDDEV in English, Japanese, Russian, Simplified Chinese, and Traditional Chinese.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Suggested reviewers: jsers

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-ck-cps-i18n-0715

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants