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

parser, ddl: data type default values support UPPER(SUBSTRING_INDEX(user(),'@',1)) #50992

Merged
merged 3 commits into from
Feb 22, 2024

Conversation

zimulala
Copy link
Contributor

@zimulala zimulala commented Feb 5, 2024

What problem does this PR solve?

Issue Number: close #50966, close #51200

Problem Summary:

What changed and how does it work?

  • Data type default values support UPPER(SUBSTRING_INDEX(user(),'@',1))

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.

None

@ti-chi-bot ti-chi-bot bot added 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. labels Feb 5, 2024
Copy link

tiprow bot commented Feb 5, 2024

Hi @zimulala. 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.

Copy link

codecov bot commented Feb 5, 2024

Codecov Report

Merging #50992 (928ab80) into master (a465300) will decrease coverage by 15.3773%.
Report is 27 commits behind head on master.
The diff coverage is 52.0000%.

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #50992         +/-   ##
=================================================
- Coverage   70.6268%   55.2496%   -15.3773%     
=================================================
  Files          1467       1576        +109     
  Lines        434809     607961     +173152     
=================================================
+ Hits         307092     335896      +28804     
- Misses       108517     249137     +140620     
- Partials      19200      22928       +3728     
Flag Coverage Δ
integration 37.2583% <4.0000%> (?)
unit 70.7233% <52.0000%> (+0.2914%) ⬆️

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

Components Coverage Δ
dumpling 54.0571% <ø> (+0.0301%) ⬆️
parser ∅ <ø> (∅)
br 52.2660% <ø> (+6.3976%) ⬆️

@zimulala zimulala force-pushed the zimuxia/user branch 2 times, most recently from 82713cc to 160ec1a Compare February 7, 2024 03:44
@ti-chi-bot ti-chi-bot bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 13, 2024
Copy link

ti-chi-bot bot commented Feb 13, 2024

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.

@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Feb 19, 2024
@pingcap pingcap deleted a comment from ti-chi-bot bot Feb 19, 2024
@zimulala
Copy link
Contributor Author

PTAL @tangenta @CbcWestwolf

return nil, false, errors.Trace(err)
}
valExpr, isValue := substringIndexFunc.Args[1].(ast.ValueExpr)
if !isValue || valExpr.GetString() != "@" {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not support a wider scope like upper(substring_index(*)) or upper(*)?

Copy link
Contributor Author

@zimulala zimulala Feb 19, 2024

Choose a reason for hiding this comment

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

For the time being, only the expressions that need to be supported are supported. In addition, these default expressions are supported by different versions of mysql (5.7, 8.0.13, 8.0.34, etc.).

@ti-chi-bot ti-chi-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 20, 2024
@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Feb 20, 2024
@zimulala
Copy link
Contributor Author

/check-issue-triage-complete

Copy link

ti-chi-bot bot commented Feb 21, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: CbcWestwolf, tangenta

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 lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Feb 21, 2024
Copy link

ti-chi-bot bot commented Feb 21, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-02-20 10:16:15.670372923 +0000 UTC m=+352264.417996034: ☑️ agreed by tangenta.
  • 2024-02-21 11:56:38.511734212 +0000 UTC m=+444687.259357323: ☑️ agreed by CbcWestwolf.

@zimulala
Copy link
Contributor Author

/retest-required

@pingcap pingcap deleted a comment from ti-chi-bot bot Feb 22, 2024
Copy link

tiprow bot commented Feb 22, 2024

@zimulala: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest-required

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.

@ti-chi-bot ti-chi-bot bot merged commit feba462 into pingcap:master Feb 22, 2024
23 checks passed
@zimulala zimulala deleted the zimuxia/user branch February 22, 2024 04:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
4 participants