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: fail ColumnSubstituteImpl if creating function returns error #53716

Merged
merged 1 commit into from
Jun 3, 2024

Conversation

YangKeao
Copy link
Member

@YangKeao YangKeao commented May 31, 2024

What problem does this PR solve?

Issue Number: close #53580, close #53582, close #53603, close #53594

Problem Summary:

The following ColumnSubstituteImpl will fail if it returns nil for a function argument.

What changed and how does it work?

This PR makes the ColumnSubstituteImpl fail if the NewFunction returns an error. I traced back the change in ColumnSubstituteImpl function. Maybe the only reason why NewFunctionInternal is used here is that the developers were quite confident that it'll not return an error, and at that time the ColumnSubstituteImpl function didn't return the second value to indicate whether it successes or not.

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 the planner will panic if the predicates have error after column substitution.

@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/needs-triage-completed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed do-not-merge/needs-triage-completed labels May 31, 2024
Copy link

codecov bot commented May 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.5612%. Comparing base (b137425) to head (2985696).
Report is 9 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #53716        +/-   ##
================================================
+ Coverage   72.5762%   74.5612%   +1.9849%     
================================================
  Files          1506       1506                
  Lines        430947     431070       +123     
================================================
+ Hits         312765     321411      +8646     
+ Misses        98878      89751      -9127     
- Partials      19304      19908       +604     
Flag Coverage Δ
integration 49.1737% <100.0000%> (?)
unit 71.4666% <40.0000%> (-0.1042%) ⬇️

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

Components Coverage Δ
dumpling 53.9957% <ø> (ø)
parser ∅ <ø> (∅)
br 50.3390% <ø> (+8.5046%) ⬆️

@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. and removed do-not-merge/needs-triage-completed labels Jun 3, 2024
@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jun 3, 2024
Copy link

ti-chi-bot bot commented Jun 3, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-06-03 07:32:02.014821839 +0000 UTC m=+3280075.771957410: ☑️ agreed by qw4990.
  • 2024-06-03 08:01:08.286595494 +0000 UTC m=+3281822.043731068: ☑️ agreed by AilinKid.

Copy link

ti-chi-bot bot commented Jun 3, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: AilinKid, qw4990, 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:

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 added the approved label Jun 3, 2024
@ti-chi-bot ti-chi-bot bot merged commit 3d68bd2 into pingcap:master Jun 3, 2024
23 checks passed
@ti-chi-bot ti-chi-bot added the needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. label Jun 4, 2024
@ti-chi-bot
Copy link
Member

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

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Jun 4, 2024
ti-chi-bot bot pushed a commit that referenced this pull request Jun 6, 2024
@YangKeao YangKeao added the needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. label Jun 25, 2024
@YangKeao YangKeao added needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. labels Jun 25, 2024
@ti-chi-bot
Copy link
Member

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

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Jun 25, 2024
ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Jun 25, 2024
@ti-chi-bot
Copy link
Member

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

@ti-chi-bot
Copy link
Member

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

ti-chi-bot bot pushed a commit that referenced this pull request Jul 1, 2024
ti-chi-bot bot pushed a commit that referenced this pull request Aug 1, 2024
ti-chi-bot bot pushed a commit that referenced this pull request Nov 4, 2024
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-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. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
5 participants