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: fix incorrect results when using a prefix index with OR condition #21251

Merged
merged 3 commits into from
Nov 25, 2020

Conversation

Reminiscent
Copy link
Contributor

@Reminiscent Reminiscent commented Nov 24, 2020

What problem does this PR solve?

Issue Number: close #21234

Problem Summary:
In the previous implementation, when we use a prefix index with OR condition, it will fail to Cut Datum By PrefixLen.

What is changed and how it works?

When we use detachDNFCondAndBuildRangeForIndex function, we take prefix index into consideration.

Check List

Tests

  • Unit test
  • Integration test

Release note

  • fix incorrect results when using a prefix index with OR condition

@Reminiscent Reminiscent requested a review from a team as a code owner November 24, 2020 09:32
@Reminiscent Reminiscent requested review from SunRunAway and removed request for a team November 24, 2020 09:32
@sre-bot
Copy link
Contributor

sre-bot commented Nov 24, 2020

@Reminiscent
Copy link
Contributor Author

Similar to the PR#8851

@Reminiscent
Copy link
Contributor Author

/cc @lzmhhh123

@ti-srebot ti-srebot requested a review from lzmhhh123 November 24, 2020 09:34
@Reminiscent
Copy link
Contributor Author

/cc @winoros

@ti-srebot ti-srebot requested a review from winoros November 24, 2020 09:35
@Reminiscent
Copy link
Contributor Author

/rebuild

Copy link
Contributor

@lzmhhh123 lzmhhh123 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-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Nov 25, 2020
@SunRunAway SunRunAway added the type/bugfix This PR fixes a bug. label Nov 25, 2020
Copy link
Member

@winoros winoros 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-srebot ti-srebot removed the status/LGT1 Indicates that a PR has LGTM 1. label Nov 25, 2020
@ti-srebot ti-srebot added the status/LGT2 Indicates that a PR has LGTM 2. label Nov 25, 2020
@winoros
Copy link
Member

winoros commented Nov 25, 2020

/merge

@ti-srebot ti-srebot added the status/can-merge Indicates a PR has been approved by a committer. label Nov 25, 2020
@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot
Copy link
Contributor

@Reminiscent merge failed.

@lzmhhh123
Copy link
Contributor

/merge

@ti-srebot
Copy link
Contributor

Your auto merge job has been accepted, waiting for:

  • 21061

@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot ti-srebot merged commit 06e9958 into pingcap:master Nov 25, 2020
@SunRunAway
Copy link
Contributor

/run-cherry-picker

1 similar comment
@lzmhhh123
Copy link
Contributor

/run-cherry-picker

@SunRunAway
Copy link
Contributor

@Reminiscent Please help cherry-pick

ti-srebot pushed a commit to ti-srebot/tidb that referenced this pull request Nov 25, 2020
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Contributor

cherry pick to release-4.0 in PR #21287

ti-srebot added a commit that referenced this pull request Nov 26, 2020
…ition (#21251) (#21287)

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@Reminiscent Reminiscent deleted the issue21234 branch August 5, 2021 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/planner SIG: Planner status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect results using a prefix index with OR condition
6 participants