Skip to content

Conversation

hawkingrei
Copy link
Member

@hawkingrei hawkingrei commented Oct 22, 2024

What problem does this PR solve?

Issue Number: close #56745

Problem Summary:

What changed and how does it work?

treat col<=>null as range scan instead of point get to avoid incorrect results. so we find it in the getPotentialEqOrInColOffset and should return -1. But this condition is wrong.

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. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. sig/planner SIG: Planner labels Oct 22, 2024
Copy link

codecov bot commented Oct 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 56.4193%. Comparing base (fdf550b) to head (e09de37).
Report is 12 commits behind head on master.

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #56769         +/-   ##
=================================================
- Coverage   73.3185%   56.4193%   -16.8992%     
=================================================
  Files          1631       1760        +129     
  Lines        451092     634656     +183564     
=================================================
+ Hits         330734     358069      +27335     
- Misses       100031     252416     +152385     
- Partials      20327      24171       +3844     
Flag Coverage Δ
integration 36.8567% <100.0000%> (?)
unit 72.5715% <100.0000%> (+0.1213%) ⬆️

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

Components Coverage Δ
dumpling 52.9478% <ø> (ø)
parser ∅ <ø> (∅)
br 52.7045% <ø> (+6.6878%) ⬆️

@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Oct 22, 2024
@hawkingrei hawkingrei requested a review from AilinKid October 22, 2024 08:42
Copy link

ti-chi-bot bot commented Oct 22, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: AilinKid, 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 Oct 22, 2024
Copy link

ti-chi-bot bot commented Oct 22, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-10-22 07:25:17.205817308 +0000 UTC m=+335917.902607903: ☑️ agreed by winoros.
  • 2024-10-22 09:27:12.752639171 +0000 UTC m=+343233.449429983: ☑️ agreed by AilinKid.

@AilinKid
Copy link
Contributor

AilinKid commented Oct 22, 2024

better add a commen: in points2EqOrInCond, when we convert points to acess condition reversely, we will build isnull func again from a single point range with null value, when we find the ref col is with not null flag, it will output zero constant which breaks the function check outside. That's why we abandon the nulleq range detecting, treat it as non-eq-in condition for later range build.

@hawkingrei
Copy link
Member Author

/hold

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 22, 2024
Signed-off-by: Weizhen Wang <[email protected]>
@hawkingrei
Copy link
Member Author

/unhold

@ti-chi-bot ti-chi-bot bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 22, 2024
@hawkingrei
Copy link
Member Author

better add a commen: in points2EqOrInCond, when we convert points to acess condition reversely, we will build isnull func again from a single point range with null value, when we find the ref col is with not null flag, it will output zero constant which breaks the function check outside. That's why we abandon the nulleq range detecting, treat it as non-eq-in condition for later range build.

Added.

@ti-chi-bot ti-chi-bot bot merged commit c066620 into pingcap:master Oct 22, 2024
23 checks passed
@hawkingrei
Copy link
Member Author

/cherrypick release-8.4

@ti-chi-bot
Copy link
Member

@hawkingrei: new pull request created to branch release-8.4: #56785.

In response to this:

/cherrypick release-8.4

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 ti-community-infra/tichi repository.

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/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error 1105 (HY000): interface conversion: expression.Expression is *expression.Constant, not *expression.ScalarFunction
4 participants