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: enhance partition prune when comparing partition key with constant of different types #59155

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

L-maple
Copy link
Contributor

@L-maple L-maple commented Jan 23, 2025

…ant of different types

What problem does this PR solve?

Issue Number: close #59123

Problem Summary:

What changed and how does it work?

SQL is a weak type language, and users always ignore constant types when comparing partition key.
When try to prune partitions, try more types of constant. For now, we should consider real and decimal, which are regularly used.

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. do-not-merge/needs-triage-completed 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. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 23, 2025
Copy link

ti-chi-bot bot commented Jan 23, 2025

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

Copy link

tiprow bot commented Jan 23, 2025

Hi @L-maple. 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.

@L-maple L-maple force-pushed the feature/support_more_types_for_partition_prune branch from 7a2d704 to 5abd231 Compare January 23, 2025 07:50
Copy link

ti-chi-bot bot commented Jan 23, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign ailinkid for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@L-maple
Copy link
Contributor Author

L-maple commented Jan 23, 2025

@Defined2014 Hi,I find a problem incompatible with MySQL. Could you help me review the PR please?

@L-maple
Copy link
Contributor Author

L-maple commented Jan 23, 2025

/assign @L-maple

@Defined2014 Defined2014 changed the title core: enhance partition prune when comparing partition key with constant of different types planner: enhance partition prune when comparing partition key with constant of different types Jan 23, 2025
@Defined2014 Defined2014 requested a review from mjonss January 23, 2025 10:04
@Defined2014 Defined2014 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 Jan 23, 2025
Copy link

tiprow bot commented Jan 23, 2025

@L-maple: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
fast_test_tiprow 5abd231 link true /test fast_test_tiprow

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

Copy link

ti-chi-bot bot commented Jan 23, 2025

@L-maple: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
idc-jenkins-ci-tidb/build 5abd231 link true /test build
idc-jenkins-ci-tidb/unit-test 5abd231 link true /test unit-test
idc-jenkins-ci-tidb/check_dev_2 5abd231 link true /test check-dev2
idc-jenkins-ci-tidb/check_dev 5abd231 link true /test check-dev

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/needs-triage-completed 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/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

core: partition prune not work when partition key has a different type with constant
2 participants