Skip to content

add tiflash hash table stats - #426

Merged
windtalker merged 1 commit into
pingcap:masterfrom
windtalker:add_hash_table_stats
Sep 3, 2026
Merged

add tiflash hash table stats#426
windtalker merged 1 commit into
pingcap:masterfrom
windtalker:add_hash_table_stats

Conversation

@windtalker

@windtalker windtalker commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: close #xxx

Problem Summary:

What is changed and how it works?

Proposal: xxx

What's Changed:

How it Works:

Related changes

  • PR to update pingcap/docs/pingcap/docs-cn:
  • Need to cherry-pick to the release branch

Summary by CodeRabbit

  • New Features
    • Added execution metrics for TiFlash hash joins and hash aggregations.
    • Reports hash-table distinct-key counts and memory usage in execution summaries.

Signed-off-by: xufei <xufeixw@mail.ustc.edu.cn>
@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 3c65307b-bb2c-43b6-ab40-ee4477ab6a5d

📥 Commits

Reviewing files that changed from the base of the PR and between 9c7d973 and 6c208f2.

⛔ Files ignored due to path filters (2)
  • go-tipb/executor.pb.go is excluded by !**/*.pb.go
  • scripts/proto.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • proto/executor.proto

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The protobuf schema adds TiFlashHashTableStats and an optional field in ExecutorExecutionSummary. The statistics contain hash-table distinct-key count and occupied storage size for TiFlash hash join and hash aggregation executors.

Changes

TiFlash hash-table statistics

Layer / File(s) Summary
Executor summary contract
proto/executor.proto
ExecutorExecutionSummary now includes optional tiflash_hash_table_stats. The new TiFlashHashTableStats message defines optional ndv and bytes fields.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 6c208

This adds optional TiFlash hash-table statistics to executor summaries without identified compatibility or behavior risks. The change is ready to merge.

Poem

A rabbit packs keys in a table so neat
With bytes and distinct counts lined up complete
The executor carries the stats in its flow
Hash joins and aggregates now show what they know
Hop, hop, the protobuf fields grow

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description preserves the required headings but contains only template placeholders. It does not explain the problem, changes, implementation, or related changes. Complete the description with the problem summary, changed behavior, implementation details, and applicable related-change information. Remove unused placeholders and template comments.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: adding TiFlash hash table statistics. It is concise and related to the pull request, although it does not use the repository's preferred module-prefix for…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title clearly identifies the main change: adding TiFlash hash table statistics. It is concise and related to the pull request, although it does not use the repository's preferred module-prefix format.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

Some tools did not complete. Review the errors below.

🔧 Buf (1.72.0)
proto/executor.proto

fatal: unable to access 'https://github.com/pingcap/tipb.git/': Failed to connect to github.com port 443 via 127.0.0.1 after 0 ms: Could not connect to server
fatal: could not fetch 662628703c9dd91aa59b22ae4c2c9e24d9ecb934 from promisor remote


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.

@windtalker
windtalker merged commit b60adf5 into pingcap:master Sep 3, 2026
5 checks passed
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