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: incorrect query result using ISNULL in the nested expressions #55306

Merged
merged 9 commits into from
Aug 13, 2024

Conversation

hawkingrei
Copy link
Member

@hawkingrei hawkingrei commented Aug 8, 2024

What problem does this PR solve?

Issue Number: close #55299

Problem Summary:

What changed and how does it work?

in the https://github.com/pingcap/tidb/pull/54819, We prevent isnull(xxx) to transfer =null. but it is wrong. we should transfer it into the right way in the points2EqOrInCond

for the example, if we meet column1 with [null,1,2,3] putting into the points2EqOrInCond. it should return isnull(column1) or column1 in (1,2,3).

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 do-not-merge/needs-linked-issue do-not-merge/needs-tests-checked release-note-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed do-not-merge/needs-linked-issue do-not-merge/needs-tests-checked labels Aug 8, 2024
@hawkingrei hawkingrei changed the title planner: incorrect query result using ISNULL which is in the OR planner: incorrect query result using ISNULL which is in the nested expressions Aug 8, 2024
@hawkingrei hawkingrei changed the title planner: incorrect query result using ISNULL which is in the nested expressions planner: incorrect query result using ISNULL in the nested expressions Aug 8, 2024
Copy link

codecov bot commented Aug 8, 2024

Codecov Report

Attention: Patch coverage is 88.88889% with 3 lines in your changes missing coverage. Please review.

Project coverage is 74.7086%. Comparing base (2abd334) to head (e36e79e).
Report is 13 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #55306        +/-   ##
================================================
- Coverage   74.8217%   74.7086%   -0.1132%     
================================================
  Files          1572       1572                
  Lines        365097     440890     +75793     
================================================
+ Hits         273172     329383     +56211     
- Misses        72157      91312     +19155     
- Partials      19768      20195       +427     
Flag Coverage Δ
integration 48.8957% <70.3703%> (?)
unit 71.8181% <88.8888%> (-1.9175%) ⬇️

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

Components Coverage Δ
dumpling 52.9567% <ø> (-2.2327%) ⬇️
parser ∅ <ø> (∅)
br 52.4820% <ø> (+4.8278%) ⬆️

@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 8, 2024
@hawkingrei
Copy link
Member Author

/retest

@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 8, 2024
@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 8, 2024
pkg/util/ranger/ranger.go Outdated Show resolved Hide resolved
Signed-off-by: Weizhen Wang <[email protected]>
@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 12, 2024
@hawkingrei
Copy link
Member Author

/retest

@hawkingrei hawkingrei requested a review from winoros August 12, 2024 11:07
@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Aug 12, 2024
@hawkingrei hawkingrei requested review from qw4990 and AilinKid August 12, 2024 17:00
Copy link

ti-chi-bot bot commented Aug 13, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: qw4990, winoros

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-12 14:30:59.666340171 +0000 UTC m=+191944.369809825: ☑️ agreed by winoros.
  • 2024-08-13 02:55:38.894708102 +0000 UTC m=+236623.598177756: ☑️ agreed by qw4990.

@ti-chi-bot ti-chi-bot bot merged commit 9a7e5cc 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 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.

wrong result using the ISNULL in the nested expression
3 participants