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

expression: avoid refinement of arguments on nullable value #55805

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tuziemon
Copy link
Contributor

@tuziemon tuziemon commented Sep 2, 2024

What problem does this PR solve?

Issue Number: close #44706

Problem Summary:

What changed and how does it work?

Currently, the equation of an unsigned int constant and a signed int column is replaced by the equation of constants 1 and 0.
However, this produces an incorrect result if the column is null, so a check for notnullflag should be added.

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. needs-ok-to-test size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 2, 2024
Copy link

ti-chi-bot bot commented Sep 2, 2024

Hi @tuziemon. 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/test-infra repository.

Copy link

tiprow bot commented Sep 2, 2024

Hi @tuziemon. 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.

@hawkingrei
Copy link
Member

/ok-to-test

Copy link

codecov bot commented Sep 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.9203%. Comparing base (c721542) to head (43be0d8).
Report is 42 commits behind head on master.

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #55805         +/-   ##
=================================================
- Coverage   74.9500%   55.9203%   -19.0297%     
=================================================
  Files          1585       1730        +145     
  Lines        367989     638574     +270585     
=================================================
+ Hits         275808     357093      +81285     
- Misses        72382     257193     +184811     
- Partials      19799      24288       +4489     
Flag Coverage Δ
integration 23.1461% <0.0000%> (?)
unit 71.9699% <100.0000%> (-2.0478%) ⬇️

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

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

@tuziemon
Copy link
Contributor Author

tuziemon commented Sep 3, 2024

/retest

1 similar comment
@tuziemon
Copy link
Contributor Author

tuziemon commented Sep 3, 2024

/retest

Copy link
Contributor

@lance6716 lance6716 left a comment

Choose a reason for hiding this comment

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

Thanks. Can you add an test that shows the SQL in #44706 now returns correct result? You can take a look at pkg/expression/integration_test/integration_test.go

@tuziemon
Copy link
Contributor Author

tuziemon commented Sep 5, 2024

Thank you for your comment.
I added the integration test to pkg/expression/integration_test/integration_test.go.

@lance6716
Copy link
Contributor

/cc @zanmato1984 @windtalker

@tuziemon
Copy link
Contributor Author

tuziemon commented Sep 5, 2024

/retest

Copy link
Contributor

@windtalker windtalker left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

ti-chi-bot bot commented Sep 6, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: windtalker

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

Copy link

ti-chi-bot bot commented Sep 6, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-09-06 01:43:52.211055215 +0000 UTC m=+581556.729108141: ☑️ agreed by windtalker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved needs-1-more-lgtm ok-to-test release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unexpected results of ANY operator
4 participants