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

util: fix a encode bug causes the wrong result of hashJoin with set and enum #18855

Merged
merged 2 commits into from
Jul 29, 2020

Conversation

wjhuang2016
Copy link
Member

@wjhuang2016 wjhuang2016 commented Jul 29, 2020

Signed-off-by: wjhuang2016 huangwenjun1997@gmail.com

What problem does this PR solve?

Issue Number: close #18850

Problem Summary:
Previously, we use the offset of set or enum to decide if two sets or enum are equal, which is not always correct.

What is changed and how it works?

What's Changed:
When encode set or enum, use the offset to get the original string

Related changes

  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test

Side effects

Release note

  • fix a encode bug causes the wrong result of hashJoin with set and enum

Signed-off-by: wjhuang2016 <huangwenjun1997@gmail.com>
@wjhuang2016 wjhuang2016 requested a review from a team as a code owner July 29, 2020 05:37
@wjhuang2016 wjhuang2016 requested review from qw4990 and removed request for a team July 29, 2020 05:37
Signed-off-by: wjhuang2016 <huangwenjun1997@gmail.com>
@wjhuang2016 wjhuang2016 added priority/release-blocker This issue blocks a release. Please solve it ASAP. type/bugfix This PR fixes a bug. labels Jul 29, 2020
@coocood
Copy link
Member

coocood commented Jul 29, 2020

LGTM

@ti-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Jul 29, 2020
@wjhuang2016 wjhuang2016 added needs-cherry-pick-4.0 and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jul 29, 2020
@wjhuang2016 wjhuang2016 changed the title util: fix a decode bug causes wrong result of hashJoin with set and enum util: fix a encode bug causes wrong result of hashJoin with set and enum Jul 29, 2020
@wjhuang2016 wjhuang2016 changed the title util: fix a encode bug causes wrong result of hashJoin with set and enum util: fix a encode bug causes the wrong result of hashJoin with set and enum Jul 29, 2020
@wjhuang2016
Copy link
Member Author

/run-all-tests

@codecov
Copy link

codecov bot commented Jul 29, 2020

Codecov Report

Merging #18855 into master will not change coverage.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             master     #18855   +/-   ##
===========================================
  Coverage   79.1969%   79.1969%           
===========================================
  Files           546        546           
  Lines        147728     147728           
===========================================
  Hits         116996     116996           
  Misses        21294      21294           
  Partials       9438       9438           

Copy link
Contributor

@qw4990 qw4990 left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-srebot ti-srebot added the status/LGT2 Indicates that a PR has LGTM 2. label Jul 29, 2020
@wjhuang2016 wjhuang2016 added the status/can-merge Indicates a PR has been approved by a committer. label Jul 29, 2020
@ti-srebot
Copy link
Contributor

@wjhuang2016 Oops! auto merge is restricted to Committers of the SIG.See the corresponding SIG page for more information. Related SIGs: execution(slack).

@qw4990 qw4990 merged commit c7dcf9c into pingcap:master Jul 29, 2020
ti-srebot pushed a commit to ti-srebot/tidb that referenced this pull request Jul 29, 2020
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Contributor

cherry pick to release-4.0 in PR #18859

@SunRunAway
Copy link
Contributor

SunRunAway commented Jul 29, 2020

@wjhuang2016 It should be cherry-picked to release-3.0 & release-3.1.

@wjhuang2016
Copy link
Member Author

/run-cherry-picker

@ti-srebot
Copy link
Contributor

cherry pick to release-3.0 in PR #19172

ti-srebot pushed a commit to ti-srebot/tidb that referenced this pull request Aug 13, 2020
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@wjhuang2016 wjhuang2016 deleted the fix_set_enum_hashjoin branch November 17, 2022 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/expression priority/release-blocker This issue blocks a release. Please solve it ASAP. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

executor: unexpected result for hash join on enum and set columns
5 participants