Skip to content
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

planner: move base plan related output of core pkg and make it well-pkged #52529

Merged
merged 8 commits into from Apr 15, 2024

Conversation

AilinKid
Copy link
Contributor

@AilinKid AilinKid commented Apr 12, 2024

What problem does this PR solve?

Issue Number: ref #51664

Problem Summary:

What changed and how does it work?

move plan_base.go from core/ to core/base/
since PhysicalPlan definition depends on Task, we should move Task interface definition core/base/ here too
The general Task definition shouldn't rely on any concrete TaskImpl, so I remove the *RootTask as the return type inside Task interface.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

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

Signed-off-by: AilinKid <314806019@qq.com>
@ti-chi-bot ti-chi-bot bot added release-note-none sig/planner SIG: Planner size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Apr 12, 2024
Copy link

tiprow bot commented Apr 12, 2024

Hi @AilinKid. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Signed-off-by: AilinKid <314806019@qq.com>
.
Signed-off-by: AilinKid <314806019@qq.com>
Signed-off-by: AilinKid <314806019@qq.com>
@AilinKid
Copy link
Contributor Author

/hold

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 12, 2024
@hawkingrei
Copy link
Member

/ok-to-test

.
Signed-off-by: AilinKid <314806019@qq.com>
@AilinKid
Copy link
Contributor Author

/unhold

@ti-chi-bot ti-chi-bot bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 12, 2024
@AilinKid
Copy link
Contributor Author

/test unit-test

Copy link

tiprow bot commented Apr 12, 2024

@AilinKid: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test fast_test_tiprow
  • /test tidb_parser_test

Use /test all to run all jobs.

In response to this:

/test unit-test

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link

codecov bot commented Apr 12, 2024

Codecov Report

Merging #52529 (6351bfb) into master (3fff0f2) will increase coverage by 0.0914%.
Report is 11 commits behind head on master.
The diff coverage is 96.7142%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #52529        +/-   ##
================================================
+ Coverage   74.1426%   74.2340%   +0.0914%     
================================================
  Files          1470       1470                
  Lines        354534     429389     +74855     
================================================
+ Hits         262861     318753     +55892     
- Misses        72435      90738     +18303     
- Partials      19238      19898       +660     
Flag Coverage Δ
integration 48.9344% <82.1428%> (?)
unit 71.1925% <95.4285%> (-1.7113%) ⬇️

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

Components Coverage Δ
dumpling 53.9957% <ø> (-2.3014%) ⬇️
parser ∅ <ø> (∅)
br 49.7359% <ø> (+7.0959%) ⬆️

.
Signed-off-by: AilinKid <314806019@qq.com>
.
Signed-off-by: AilinKid <314806019@qq.com>
Copy link
Member

@hi-rustin hi-rustin left a comment

Choose a reason for hiding this comment

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

It seems we don't need to rename it.

@@ -22,6 +22,7 @@ import (

"github.com/pingcap/tidb/pkg/expression"
"github.com/pingcap/tidb/pkg/parser/ast"
base2 "github.com/pingcap/tidb/pkg/planner/core/base"
Copy link
Member

Choose a reason for hiding this comment

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

Can I ask why do we need to rename here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

there is another core pkg in the import list here, oh! for this file, its not, I will change it back to base

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nice catch

Signed-off-by: AilinKid <314806019@qq.com>
Copy link

ti-chi-bot bot commented Apr 15, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-04-12 06:41:46.836802372 +0000 UTC m=+1203768.364342917: ☑️ agreed by hawkingrei.
  • 2024-04-15 09:42:07.761223769 +0000 UTC m=+244746.872270218: ☑️ agreed by Defined2014.

Copy link
Contributor

@lance6716 lance6716 left a comment

Choose a reason for hiding this comment

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

/approve

Copy link

ti-chi-bot bot commented Apr 15, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Defined2014, hawkingrei, hi-rustin, lance6716

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm ok-to-test release-note-none sig/planner SIG: Planner size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants