Skip to content

move joined_rows to tiflash join stats - #434

Merged
windtalker merged 1 commit into
pingcap:masterfrom
ChangRui-Ryan:changrui_join
Oct 15, 2026
Merged

windtalker merged 1 commit into
pingcap:masterfrom
ChangRui-Ryan:changrui_join

Conversation

@ChangRui-Ryan

@ChangRui-Ryan ChangRui-Ryan commented Oct 14, 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
    • Execution summaries now include TiFlash join statistics, reporting joined rows across supported join types.

@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d4f16f16-fab0-46db-ba97-92f23db7bf8f
📥 Commits

Reviewing files that changed from the base of the PR and between 9299b8c and accc34b.

⛔ 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: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

The protobuf contract adds tiflash_join_stats to ExecutorExecutionSummary. It moves TiFlashJoinStats.joined_rows from field 4 to field 1 and updates its description to cover join kinds and reporting behavior.

Changes: TiFlash join statistics

Layer / File(s) Summary
Executor summary and join statistics contract
proto/executor.proto
ExecutorExecutionSummary adds tiflash_join_stats at field 12. TiFlashJoinStats.joined_rows moves to field 1, and its description now covers hash joins, cross joins, semi/anti first-match behavior, and reporting after probing.

Priority: ⬇️ Low

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

Change: Feature

Suggested reviewers: windtalker

Merge Risk: ⚪ Minimal · up to accc3

No actionable merge-blocking issue is established; the join-statistics contract is ready for normal checks.

### Architecture Summary

Architecture risk: 🔵 Low · up to accc3

The change affects 1 system.

Changed systems: proto

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — proto (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in proto/executor.proto: ExecutorExecutionSummary adds the tiflash_join_stats field at number 12, described as populated for all TiFlash join kinds.
  • observed — Modified behavior in proto/executor.proto: Closes TiFlashHashTableStats before the following message declaration.
  • observed — Modified behavior in proto/executor.proto: TiFlashJoinStats.joined_rows changes from field 4 to field 1. Its description now includes hash-join equi-key matches and cross-join candidate pairs, accounts for first-match shortcuts in semi/anti joins, and states that every join executor reports the count after probing, with zero indicating no matches. This replaces the previous description limiting reporting to hash joins and excluding hash aggregation.
Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Description check Warning The description only reproduces the template and leaves the problem summary, changes, implementation details, and related changes sections unfilled. Complete the description with the problem being solved, issue reference if applicable, exact changes to ExecutorExecutionSummary and TiFlashJoinStats, how the field move works, and any required documentation or release-branch cherry-pick de…
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly identifies the main change: moving joined_rows to TiFlash join statistics.
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: Description check

Resolution

Complete the description with the problem being solved, issue reference if applicable, exact changes to ExecutorExecutionSummary and TiFlashJoinStats, how the field move works, and any required documentation or release-branch cherry-pick details.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

A rabbit checks the fields in line,
Join counts hop to slot one, just fine.
Hash and cross joins leave their trace,
Semi and anti stop at first place.
Zero rows rest where matches cease,
The protobuf burrow keeps its peace.

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

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

lgtm

@windtalker
windtalker merged commit 7adb3bb into pingcap:master Oct 15, 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