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: Add cast to ensure that the actual output type of builtin_control is consistent with retType | tidb-test=pr/2216 #46786

Merged
merged 51 commits into from
Sep 22, 2023

Conversation

SeaRise
Copy link
Contributor

@SeaRise SeaRise commented Sep 8, 2023

What problem does this PR solve?

Issue Number: close #44196

Problem Summary:

What is changed and how it works?

  • newBaseBuiltinFuncWithTp cast args to decimal/datetime/timestampe but ignores decimal, so need a new function newBaseBuiltinFuncWithFieldTypes
  • refine InferType4ControlFuncs and use InferType4ControlFuncs in caseWhenFunctionClass::getFunction

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

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@ti-chi-bot ti-chi-bot bot added do-not-merge/invalid-title do-not-merge/needs-linked-issue do-not-merge/needs-tests-checked release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 8, 2023
@tiprow
Copy link

tiprow bot commented Sep 8, 2023

Hi @SeaRise. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

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.

@SeaRise SeaRise changed the title fix Issue 44196 Add cast to ensure that the actual output type of builtin_control is consistent with retType Sep 8, 2023
@SeaRise SeaRise changed the title Add cast to ensure that the actual output type of builtin_control is consistent with retType expression: Add cast to ensure that the actual output type of builtin_control is consistent with retType Sep 8, 2023
@codecov
Copy link

codecov bot commented Sep 8, 2023

Codecov Report

Merging #46786 (e4addd6) into master (2680a9a) will decrease coverage by 0.1557%.
Report is 7 commits behind head on master.
The diff coverage is 90.4522%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #46786        +/-   ##
================================================
- Coverage   72.9964%   72.8408%   -0.1557%     
================================================
  Files          1338       1359        +21     
  Lines        399462     407398      +7936     
================================================
+ Hits         291593     296752      +5159     
- Misses        89018      91922      +2904     
+ Partials      18851      18724       -127     
Flag Coverage Δ
integration 32.1767% <90.4522%> (?)
unit 73.1601% <86.4321%> (+0.1637%) ⬆️

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

Components Coverage Δ
dumpling 53.9913% <ø> (ø)
parser 84.9728% <ø> (+0.0107%) ⬆️
br 48.9743% <ø> (-4.1266%) ⬇️

@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 11, 2023
@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 11, 2023
@SeaRise
Copy link
Contributor Author

SeaRise commented Sep 21, 2023

/test check-dev2

@tiprow
Copy link

tiprow bot commented Sep 21, 2023

@SeaRise: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test tiprow_fast_test

Use /test all to run all jobs.

In response to this:

/test check-dev2

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.

@SeaRise
Copy link
Contributor Author

SeaRise commented Sep 21, 2023

/test check-dev2

@tiprow
Copy link

tiprow bot commented Sep 21, 2023

@SeaRise: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test tiprow_fast_test

Use /test all to run all jobs.

In response to this:

/test check-dev2

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.

@SeaRise
Copy link
Contributor Author

SeaRise commented Sep 21, 2023

/test check-dev2

@tiprow
Copy link

tiprow bot commented Sep 21, 2023

@SeaRise: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test tiprow_fast_test

Use /test all to run all jobs.

In response to this:

/test check-dev2

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.

@SeaRise
Copy link
Contributor Author

SeaRise commented Sep 22, 2023

/test check-dev2

@tiprow
Copy link

tiprow bot commented Sep 22, 2023

@SeaRise: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test tiprow_fast_test

Use /test all to run all jobs.

In response to this:

/test check-dev2

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.

@SeaRise
Copy link
Contributor Author

SeaRise commented Sep 22, 2023

/test check-dev2

@tiprow
Copy link

tiprow bot commented Sep 22, 2023

@SeaRise: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test tiprow_fast_test

Use /test all to run all jobs.

In response to this:

/test check-dev2

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.

@wuhuizuo
Copy link
Contributor

/retest

@ti-chi-bot
Copy link
Member

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

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Sep 22, 2023
@ti-chi-bot
Copy link
Member

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

@ti-chi-bot
Copy link
Member

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

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Sep 22, 2023
@ti-chi-bot
Copy link
Member

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

@ti-chi-bot
Copy link
Member

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

@CalvinNeo
Copy link
Member

Also resolves There is no supertype for types Decimal(44,6), Decimal(65,4) because the least supertype is Decimal(67,6) problem.

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.3 Type: Need cherry pick to release-5.3 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. ok-to-test Indicates a PR is ready to be tested. release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect query result
6 participants