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: fix the const prop over ENUM type #50208

Merged
merged 2 commits into from
Jan 10, 2024

Conversation

winoros
Copy link
Member

@winoros winoros commented Jan 8, 2024

What problem does this PR solve?

Issue Number: close #49440

Problem Summary:

ENUM is a hybrid type and has two possible evaluation ways.

This pull give a correct behavior for the enum and disables the propagation for other two hybrid type SET and BIT.

What changed and how does it work?

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.

Do the right constant propagation when the column is a ENUM

@ti-chi-bot ti-chi-bot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. needs-cherry-pick-release-5.4 Should cherry pick this PR to release-5.4 branch. needs-cherry-pick-release-6.1 Should cherry pick this PR to release-6.1 branch. needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 8, 2024
Copy link

codecov bot commented Jan 8, 2024

Codecov Report

Merging #50208 (1391855) into master (f0a4104) will decrease coverage by 14.6586%.
Report is 22 commits behind head on master.
The diff coverage is 44.4444%.

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #50208         +/-   ##
=================================================
- Coverage   70.0683%   55.4097%   -14.6586%     
=================================================
  Files          1437       1553        +116     
  Lines        419055     586698     +167643     
=================================================
+ Hits         293625     325088      +31463     
- Misses       105177     238912     +133735     
- Partials      20253      22698       +2445     
Flag Coverage Δ
integration 36.5834% <44.4444%> (?)
unit 70.0227% <13.3333%> (-0.0457%) ⬇️

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

Components Coverage Δ
dumpling 54.0269% <ø> (ø)
parser ∅ <ø> (∅)
br 55.5355% <ø> (+5.8141%) ⬆️

@hawkingrei
Copy link
Member

/retest

1 similar comment
@hawkingrei
Copy link
Member

/retest

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jan 9, 2024
@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jan 9, 2024
Copy link

ti-chi-bot bot commented Jan 9, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-01-09 01:14:31.18387121 +0000 UTC m=+319460.768124896: ☑️ agreed by AilinKid.
  • 2024-01-09 15:25:00.488582082 +0000 UTC m=+370490.072835768: ☑️ agreed by time-and-fate.

Copy link

ti-chi-bot bot commented Jan 10, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: AilinKid, time-and-fate, XuHuaiyu

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 the approved label Jan 10, 2024
@ti-chi-bot ti-chi-bot bot merged commit 01e2ee6 into pingcap:master Jan 10, 2024
22 checks passed
@ti-chi-bot
Copy link
Member

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

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Jan 10, 2024
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: #50269.

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Jan 10, 2024
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: #50271.

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Jan 10, 2024
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-7.1: #50273.

@ti-chi-bot
Copy link
Member

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

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Jan 10, 2024
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@winoros winoros deleted the enum-prop-over-outer-join branch January 10, 2024 10:06
@winoros
Copy link
Member Author

winoros commented Jan 10, 2024

/run-cherry-picker release-7.6

@ti-chi-bot
Copy link
Member

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

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.4 Should cherry pick this PR to release-5.4 branch. needs-cherry-pick-release-6.1 Should cherry pick this PR to release-6.1 branch. needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. needs-cherry-pick-release-7.6 release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

query gets wrong result by constant propagation
6 participants