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

types: fix incorrect return type about if function when argument type contains bit #27611

Closed
wants to merge 10 commits into from

Conversation

yuqi1129
Copy link
Contributor

… contains bit

What problem does this PR solve?

Issue Number: close #26358
Problem Summary:

What is changed and how it works?

Proposal: xxx

What's Changed:

How it Works:

Check List

Tests

  • [*] Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

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

None

@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has not been approved.

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added 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. labels Aug 26, 2021
@yuqi1129
Copy link
Contributor Author

TODO: Add some test

@ti-chi-bot ti-chi-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 27, 2021
@github-actions github-actions bot added the sig/execution SIG execution label Aug 27, 2021
@yuqi1129
Copy link
Contributor Author

/cc @lzmhhh123 @wshwsh12

@@ -1539,7 +1539,7 @@ func (s *testSuiteP2) TestUnion(c *C) {
tk.MustExec("drop table if exists t")
tk.MustExec("create table t(a bit(20), b float, c double, d int)")
tk.MustExec("insert into t values(10, 10, 10, 10), (1, -1, 2, -2), (2, -2, 1, 1), (2, 1.1, 2.1, 10.1)")
tk.MustQuery("select a from t union select 10 order by a").Check(testkit.Rows("1", "2", "10"))
tk.MustQuery("select a from t union select 10 order by a").Check(testkit.Rows("\x00\x00\x01", "\x00\x00\x02", "\x00\x00\n", "10"))
Copy link
Contributor

Choose a reason for hiding this comment

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

Why need change the test? Seems the old result same with mysql.

@@ -887,15 +887,15 @@ var fieldTypeMergeRules = [fieldTypeNum][fieldTypeNum]byte{
/* mysql.TypeBit -> */
{
// mysql.TypeUnspecified mysql.TypeTiny
mysql.TypeVarchar, mysql.TypeLonglong,
mysql.TypeVarchar, mysql.TypeVarchar,
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any reason for these changes? Mysql's type merge is same with tidb.

@ti-chi-bot ti-chi-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 22, 2021
@ti-chi-bot
Copy link
Member

@yuqi1129: PR needs rebase.

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.

@zanmato1984
Copy link
Contributor

I'm closing this PR as: 1) the related issue has been identified as a non-bug and 2) we don't see a respond to the review comment for a long time.

Feel free to go to the original issue to discuss with us if you have any question. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/expression needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. release-note-none Denotes a PR that doesn't merit a release note. sig/execution SIG execution 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.

Incorrect return type about if function when argument type contains bit
4 participants