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: seperate methods in PlanContext and EvalContext/BuildContext #51382

Merged
merged 2 commits into from
Feb 28, 2024

Conversation

lcwangchao
Copy link
Collaborator

@lcwangchao lcwangchao commented Feb 28, 2024

What problem does this PR solve?

Issue Number: close #51381

Problem Summary:

Currently, PlanContext is an interface that extends expression.BuildContext. That is not very good because the methods in expression.BuildContext or expression.EvalContext will also be seen in PlanContext directly.

What changed and how does it work?

After this PR:

  • PlanContext does not extend BuildContext anymore
  • PlanContext will have a new method GetExprCtx to return the BuildContext

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

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Feb 28, 2024
Copy link

tiprow bot commented Feb 28, 2024

Hi @lcwangchao. 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.

@lcwangchao lcwangchao changed the title planner: seperate methods in PlanContext and EvalContext/`BuildCo… planner: seperate methods in PlanContext and EvalContext/BuildContext Feb 28, 2024
Copy link

codecov bot commented Feb 28, 2024

Codecov Report

Merging #51382 (bcd04eb) into master (e586960) will increase coverage by 2.2412%.
Report is 4 commits behind head on master.
The diff coverage is 92.8240%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #51382        +/-   ##
================================================
+ Coverage   70.6462%   72.8875%   +2.2412%     
================================================
  Files          1461       1461                
  Lines        434902     436958      +2056     
================================================
+ Hits         307242     318488     +11246     
+ Misses       108374      98541      -9833     
- Partials      19286      19929       +643     
Flag Coverage Δ
integration 49.3665% <81.0185%> (?)
unit 70.3692% <84.4907%> (-0.0694%) ⬇️

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

Components Coverage Δ
dumpling 53.9957% <ø> (ø)
parser ∅ <ø> (∅)
br 51.3772% <100.0000%> (+5.5217%) ⬆️

Copy link
Contributor

@D3Hunter D3Hunter left a comment

Choose a reason for hiding this comment

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

lightning part lgtm

@lcwangchao
Copy link
Collaborator Author

/retest

Copy link

tiprow bot commented Feb 28, 2024

@lcwangchao: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

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
Member

@YangKeao YangKeao left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Feb 28, 2024
@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Feb 28, 2024
Copy link

ti-chi-bot bot commented Feb 28, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-02-28 09:03:50.405762069 +0000 UTC m=+1039119.153385172: ☑️ agreed by YangKeao.
  • 2024-02-28 09:07:54.362997486 +0000 UTC m=+1039363.110620597: ☑️ agreed by winoros.

Copy link

ti-chi-bot bot commented Feb 28, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: D3Hunter, winoros, YangKeao

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 the approved label Feb 28, 2024
@ti-chi-bot ti-chi-bot bot merged commit f1410bf into pingcap:master Feb 28, 2024
33 of 35 checks passed
@lcwangchao lcwangchao deleted the seperate_plan_expr_ctx branch March 1, 2024 02:52
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. 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.

seperate methods in PlanContext and EvalContext/BuildContext
4 participants