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 type infer for tidb's builtin compare(least and great… #22562

Merged
merged 5 commits into from
Jan 27, 2021

Conversation

qw4990
Copy link
Contributor

@qw4990 qw4990 commented Jan 27, 2021

cherry-pick #21150 to release-4.0


Signed-off-by: iosmanthus myosmanthustree@gmail.com

What problem does this PR solve?

Issue Number:
close #17994
close #9765

Problem Summary:

What is changed and how it works?

What's Changed:
This pull request migrates some MySQL type merge rules to make TiDB's type infer rules more MySQL compatible.

How it Works:
This pull request port https://github.com/mysql/mysql-server/blob/ee4455a33b10f1b1886044322e4893f587b319ed/sql%2Fitem_func.cc#L3470 to infer the result type of least/greatest

Related changes

  • PR to update pingcap/docs/pingcap/docs-cn:
  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test
  • Integration test
  • No code

Side effects

  • Performance regression
    • Consumes more CPU
    • Consumes more MEM
  • Breaking backward compatibility

Release note

  • expression: fix type infer for TiDB's builtin compare(least and greatest)

…est) (pingcap#21150)

Signed-off-by: iosmanthus <myosmanthustree@gmail.com>
@qw4990
Copy link
Contributor Author

qw4990 commented Jan 27, 2021

/run-all-tests

@qw4990
Copy link
Contributor Author

qw4990 commented Jan 27, 2021

/run-all-tests

@qw4990 qw4990 added the type/bugfix This PR fixes a bug. label Jan 27, 2021
@qw4990
Copy link
Contributor Author

qw4990 commented Jan 27, 2021

/run-all-tests

@qw4990
Copy link
Contributor Author

qw4990 commented Jan 27, 2021

/run-all-tests

@qw4990
Copy link
Contributor Author

qw4990 commented Jan 27, 2021

/rebuild

@qw4990
Copy link
Contributor Author

qw4990 commented Jan 27, 2021

/run-all-tests

1 similar comment
@qw4990
Copy link
Contributor Author

qw4990 commented Jan 27, 2021

/run-all-tests

@ti-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Jan 27, 2021
Copy link
Member

@winoros winoros 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 removed the status/LGT1 Indicates that a PR has LGTM 1. label Jan 27, 2021
@ti-srebot ti-srebot added the status/LGT2 Indicates that a PR has LGTM 2. label Jan 27, 2021
@zz-jason
Copy link
Member

/merge

@ti-srebot ti-srebot added the status/can-merge Indicates a PR has been approved by a committer. label Jan 27, 2021
@ti-srebot
Copy link
Contributor

/run-all-tests

@qw4990 qw4990 merged commit 3f33bdb into pingcap:release-4.0 Jan 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/expression 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. type/4.0-cherry-pick
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants