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

util/ranger: consider good non-point ranges from CNF item #44384

Merged
merged 8 commits into from Jun 5, 2023

Conversation

xuyifangreeneyes
Copy link
Contributor

@xuyifangreeneyes xuyifangreeneyes commented Jun 4, 2023

What problem does this PR solve?

Issue Number: close #44389

Problem Summary:

What is changed and how it works?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

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 requested review from jackysp and shenli June 4, 2023 05:40
@ti-chi-bot ti-chi-bot bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jun 4, 2023
@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. needs-cherry-pick-release-5.3 Type: Need cherry pick to release-5.3 needs-cherry-pick-release-5.4 Type: Need cherry pick to release-5.4 needs-cherry-pick-release-6.1 needs-cherry-pick-release-6.5 needs-cherry-pick-release-7.1 and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. do-not-merge/needs-linked-issue labels Jun 4, 2023
@xuyifangreeneyes xuyifangreeneyes requested a review from a team as a code owner June 4, 2023 10:39
@xuyifangreeneyes xuyifangreeneyes changed the title util/ranger: pass good ranges from CNF item out util/ranger: consider good non-point ranges from CNF item Jun 4, 2023
Comment on lines 205 to 215
if i == 0 {
maxColNum = len(ran.LowVal)
minColNum = len(ran.LowVal)
} else {
if len(ran.LowVal) > maxColNum {
maxColNum = len(ran.LowVal)
}
if len(ran.LowVal) < minColNum {
minColNum = len(ran.LowVal)
}
}
Copy link
Member

Choose a reason for hiding this comment

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

We can initiate minColNum with MaxInt and then use Max and Min to make the code simpler.

@ti-chi-bot
Copy link

ti-chi-bot bot commented Jun 5, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-06-04 23:37:52.272116448 +0000 UTC m=+218658.545089225: ☑️ agreed by time-and-fate.
  • 2023-06-05 01:02:10.874027254 +0000 UTC m=+223717.147000025: ☑️ agreed by chrysan.

@chrysan
Copy link
Contributor

chrysan commented Jun 5, 2023

/merge

@chrysan
Copy link
Contributor

chrysan commented Jun 5, 2023

/approve

@ti-chi-bot
Copy link

ti-chi-bot bot commented Jun 5, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chrysan, qw4990, time-and-fate

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:
  • OWNERS [chrysan,qw4990,time-and-fate]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

1 similar comment
@ti-chi-bot
Copy link

ti-chi-bot bot commented Jun 5, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chrysan, qw4990, time-and-fate

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:
  • OWNERS [chrysan,qw4990,time-and-fate]

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 merged commit 85d6323 into pingcap:master Jun 5, 2023
8 checks passed
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-5.3: #44394.

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Jun 5, 2023
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-5.4: #44395.

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Jun 5, 2023
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-6.1: #44396.

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Jun 5, 2023
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-6.5: #44397.

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Jun 5, 2023
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.1: #44398.

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Jun 5, 2023
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@xuyifangreeneyes xuyifangreeneyes deleted the complex-range branch June 5, 2023 02:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm needs-cherry-pick-release-5.3 Type: Need cherry pick to release-5.3 needs-cherry-pick-release-5.4 Type: Need cherry pick to release-5.4 needs-cherry-pick-release-6.1 needs-cherry-pick-release-6.5 needs-cherry-pick-release-7.1 release-note-none 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.

Cannot build optimal range on index ab for c = 10 and (a = 'xx' or (a = 'kk' and b = 1))
5 participants