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 rule_constant_propagation to rule pkg. (#55231) #55345

Merged
merged 1 commit into from
Aug 13, 2024

Conversation

qingfeng777
Copy link
Contributor

@qingfeng777 qingfeng777 commented Aug 10, 2024

What problem does this PR solve?

Issue Number: ref #55231

Problem Summary:

What changed and how does it work?

move rule_constant_propagation from core to rule pkg

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
    • I ran locally, and executed a sql with pagination.
  • 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. do-not-merge/needs-tests-checked labels Aug 10, 2024
Copy link

ti-chi-bot bot commented Aug 10, 2024

Welcome @qingfeng777!

It looks like this is your first PR to pingcap/tidb 🎉.

I'm the bot to help you request reviewers, add labels and more, See available commands.

We want to make sure your contribution gets all the attention it needs!



Thank you, and welcome to pingcap/tidb. 😃

@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. sig/planner SIG: Planner needs-ok-to-test Indicates a PR created by contributors and need ORG member send '/ok-to-test' to start testing. and removed do-not-merge/needs-tests-checked labels Aug 10, 2024
Copy link

ti-chi-bot bot commented Aug 10, 2024

Hi @qingfeng777. Thanks for your PR.

I'm waiting for a pingcap member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

Copy link

tiprow bot commented Aug 10, 2024

Hi @qingfeng777. 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-sigs/prow repository.

@hawkingrei
Copy link
Member

/ok-to-test

@ti-chi-bot ti-chi-bot bot added ok-to-test Indicates a PR is ready to be tested. and removed needs-ok-to-test Indicates a PR created by contributors and need ORG member send '/ok-to-test' to start testing. labels Aug 10, 2024
Copy link

codecov bot commented Aug 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.6749%. Comparing base (bc0af68) to head (476cdf6).
Report is 8 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #55345        +/-   ##
================================================
+ Coverage   72.9164%   74.6749%   +1.7585%     
================================================
  Files          1572       1578         +6     
  Lines        440067     441089      +1022     
================================================
+ Hits         320881     329383      +8502     
+ Misses        99480      91504      -7976     
- Partials      19706      20202       +496     
Flag Coverage Δ
integration 49.2901% <ø> (?)
unit 71.8530% <ø> (-0.1136%) ⬇️

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

Components Coverage Δ
dumpling 52.9567% <ø> (+0.0189%) ⬆️
parser ∅ <ø> (∅)
br 52.4961% <ø> (+6.6341%) ⬆️

@hawkingrei
Copy link
Member

@qingfeng777 Please run the make bazel_prepare.

@qingfeng777
Copy link
Contributor Author

@hawkingrei Done

Copy link
Contributor

@AilinKid AilinKid left a comment

Choose a reason for hiding this comment

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

Rest LGTM

basically from the workflow, you should add your idea first in the comment then file your pull request after we acked.
like

"idea: after migrating the file, the function validCompareConstantPredicate is not valid anymore, it is refed by logical selection in the core pkg. I moved it into constant_propagation.go as in ruleutil for usage."

anyway, since this one is quite simple, these changes look good to me.

pkg/planner/core/rule/util/BUILD.bazel Outdated Show resolved Hide resolved
pkg/planner/core/rule/util/rule_constant_propagation.go Outdated Show resolved Hide resolved
@ti-chi-bot ti-chi-bot bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 12, 2024
@AilinKid
Copy link
Contributor

validCompareConstantPredicate is moved to expression pkg, seems we don't need to handle it here now.

@ti-chi-bot ti-chi-bot bot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 12, 2024
@qingfeng777
Copy link
Contributor Author

qingfeng777 commented Aug 12, 2024

validCompareConstantPredicate is moved to expression pkg, seems we don't need to handle it here now.

After my PR, you refactored the codebase. I have deleted it now.

@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Aug 13, 2024
@qingfeng777 qingfeng777 requested a review from AilinKid August 13, 2024 03:33
Copy link

ti-chi-bot bot commented Aug 13, 2024

[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 Aug 13, 2024
Copy link

ti-chi-bot bot commented Aug 13, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-08-13 01:41:08.915725972 +0000 UTC m=+232153.619195633: ☑️ agreed by hawkingrei.
  • 2024-08-13 03:57:11.839661376 +0000 UTC m=+240316.543131035: ☑️ agreed by AilinKid.

@ti-chi-bot ti-chi-bot bot merged commit 7e9f853 into pingcap:master Aug 13, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm ok-to-test Indicates a PR is ready to be tested. release-note-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants