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

executor, codec: hash join build wrong hash key for ENUM value #49032

Merged
merged 3 commits into from
Nov 30, 2023

Conversation

winoros
Copy link
Member

@winoros winoros commented Nov 30, 2023

This is a manual cherry-pick for #49031

What problem does this PR solve?

Issue Number: close #48991

Problem Summary:

What changed and how does it work?

When the projection disables the ColumnEvaluator, it will eval the ENUM and parse a new ENUM. But the new ENUM value's value index will be set to 0.

But when we construct the hash value for the join key, we use the value index to seek the string value. So a wrong hash key is constructed.

This pull aims to solve the case.

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.

Fix the issue that hash join will construct wrong join key for ENUM type

@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. do-not-merge/cherry-pick-not-approved size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 30, 2023
Copy link

codecov bot commented Nov 30, 2023

Codecov Report

❗ No coverage uploaded for pull request base (release-6.5@e5ee37e). Click here to learn what that means.
The diff coverage is n/a.

Additional details and impacted files
@@               Coverage Diff                @@
##             release-6.5     #49032   +/-   ##
================================================
  Coverage               ?   73.6447%           
================================================
  Files                  ?       1087           
  Lines                  ?     349433           
  Branches               ?          0           
================================================
  Hits                   ?     257339           
  Misses                 ?      75579           
  Partials               ?      16515           

@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Nov 30, 2023
@ti-chi-bot ti-chi-bot bot added the lgtm label Nov 30, 2023
Copy link

ti-chi-bot bot commented Nov 30, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: guo-shaoge, 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:
  • OWNERS [XuHuaiyu,guo-shaoge]

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 removed the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Nov 30, 2023
Copy link

ti-chi-bot bot commented Nov 30, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-11-30 07:40:04.491973763 +0000 UTC m=+1081233.157199958: ☑️ agreed by XuHuaiyu.
  • 2023-11-30 08:01:52.585985998 +0000 UTC m=+1082541.251212193: ☑️ agreed by guo-shaoge.

@ti-chi-bot ti-chi-bot added the cherry-pick-approved Cherry pick PR approved by release team. label Nov 30, 2023
@ti-chi-bot ti-chi-bot bot merged commit ff2fcec into pingcap:release-6.5 Nov 30, 2023
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved cherry-pick-approved Cherry pick PR approved by release team. lgtm release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants