Skip to content

planner: add MPPSink interface for later MPP CTE support #61252

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 26, 2025

Conversation

winoros
Copy link
Member

@winoros winoros commented May 21, 2025

What problem does this PR solve?

Issue Number: ref #61239

Problem Summary:

What changed and how does it work?

to support the new cte operator on mpp side.
the top operator of each fragment can have multiple choices, not only the current ExchangeSender.

so this pr is to abstract an interface for later use.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test

    refactor codebase

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 21, 2025
@@ -52,7 +53,7 @@ type Fragment struct {
CTEReaders []*PhysicalCTE // The receivers for CTE storage/producer.

// following fields are filled after scheduling.
ExchangeSender *PhysicalExchangeSender // data exporter
Sink MPPSink // data exporter
Copy link
Member Author

Choose a reason for hiding this comment

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

This name is to be compatible with tiflash's concept Sink and Source.
Other names are welcome.

Copy link

codecov bot commented May 21, 2025

Codecov Report

Attention: Patch coverage is 86.95652% with 3 lines in your changes missing coverage. Please review.

Project coverage is 73.5213%. Comparing base (ced609b) to head (610653e).
Report is 37 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #61252        +/-   ##
================================================
+ Coverage   73.1802%   73.5213%   +0.3410%     
================================================
  Files          1726       1727         +1     
  Lines        478091     485360      +7269     
================================================
+ Hits         349868     356843      +6975     
- Misses       106781     107050       +269     
- Partials      21442      21467        +25     
Flag Coverage Δ
integration 43.3463% <0.0000%> (?)
unit 72.4890% <86.9565%> (+0.0551%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 52.7804% <ø> (ø)
parser ∅ <ø> (∅)
br 46.5382% <ø> (-1.0370%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hawkingrei
Copy link
Member

/retest

@hawkingrei hawkingrei requested a review from qw4990 May 22, 2025 16:16
@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels May 22, 2025
@@ -52,7 +53,7 @@ type Fragment struct {
CTEReaders []*PhysicalCTE // The receivers for CTE storage/producer.

// following fields are filled after scheduling.
ExchangeSender *PhysicalExchangeSender // data exporter
Sink MPPSink // data exporter
Copy link
Contributor

Choose a reason for hiding this comment

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

seems a internal interface name, if it won't be in the explain, i think its fine

Copy link

ti-chi-bot bot commented May 26, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: AilinKid, hawkingrei

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels May 26, 2025
Copy link

ti-chi-bot bot commented May 26, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-05-22 16:16:52.329123974 +0000 UTC m=+109116.746183537: ☑️ agreed by hawkingrei.
  • 2025-05-26 10:17:25.980570292 +0000 UTC m=+264176.352357752: ☑️ agreed by AilinKid.

@hawkingrei
Copy link
Member

/retest

@ti-chi-bot ti-chi-bot bot merged commit 0a9281c into pingcap:master May 26, 2025
24 checks passed
@winoros winoros deleted the abstract-sink-interface branch May 26, 2025 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants