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: support hints in 'REPLACE INTO' statement #50007

Merged
merged 1 commit into from
Jan 4, 2024

Conversation

YangKeao
Copy link
Member

@YangKeao YangKeao commented Jan 3, 2024

What problem does this PR solve?

Issue Number: close #34325

Problem Summary:

Hints are not supported in REPLACE INTO ... statement.

What changed and how does it work?

I simply modify the parser to support this hints. I also tested that some simple hints (e.g. SET_VAR) actually work.

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

Fix the issue that hints are not supported in the `REPLACE INTO` statement.

Signed-off-by: Yang Keao <yangkeao@chunibyo.icu>
@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. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jan 3, 2024
Copy link

codecov bot commented Jan 3, 2024

Codecov Report

Merging #50007 (c2592cc) into master (37c7326) will decrease coverage by 3.3750%.
Report is 20 commits behind head on master.
The diff coverage is n/a.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #50007        +/-   ##
================================================
- Coverage   71.9115%   68.5366%   -3.3750%     
================================================
  Files          1438       1441         +3     
  Lines        345747     412686     +66939     
================================================
+ Hits         248632     282841     +34209     
- Misses        76855     110843     +33988     
+ Partials      20260      19002      -1258     
Flag Coverage Δ
integration 44.1385% <ø> (?)
unit 71.9682% <ø> (+0.0567%) ⬆️

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

Components Coverage Δ
dumpling 56.3129% <ø> (ø)
parser ∅ <ø> (∅)
br 42.7076% <ø> (-8.9005%) ⬇️

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jan 3, 2024
@YangKeao YangKeao requested a review from bb7133 January 3, 2024 07:42
@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jan 3, 2024
Copy link

ti-chi-bot bot commented Jan 3, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-01-03 06:47:49.635660352 +0000 UTC m=+2239560.672887277: ☑️ agreed by hawkingrei.
  • 2024-01-03 11:53:26.739763212 +0000 UTC m=+2257897.776990139: ☑️ agreed by xhebox.

@easonn7
Copy link

easonn7 commented Jan 4, 2024

/approve

Copy link

ti-chi-bot bot commented Jan 4, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: easonn7, hawkingrei, tangenta, xhebox

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 Jan 4, 2024
@ti-chi-bot ti-chi-bot bot merged commit 494d9f0 into pingcap:master Jan 4, 2024
17 of 18 checks passed
AilinKid pushed a commit to AilinKid/tidb that referenced this pull request Jan 17, 2024
@YangKeao YangKeao added type/cherry-pick-for-release-6.5 This PR is cherry-picked to release-6.5 from a source PR. 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. labels Jan 23, 2024
@YangKeao
Copy link
Member Author

YangKeao commented Jan 23, 2024

/run-cherry-pick

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Jan 23, 2024
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

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

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Jan 23, 2024
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

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

@YangKeao YangKeao added needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. and removed type/cherry-pick-for-release-6.5 This PR is cherry-picked to release-6.5 from a source PR. labels Jan 23, 2024
@ti-chi-bot
Copy link
Member

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

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Jan 23, 2024
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
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. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

REPLACE statement with optimizer hint is resulting syntax error
6 participants