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 (Row(..),Row(..))=>(..) in the binding mode #51319

Merged
merged 7 commits into from
Feb 27, 2024

Conversation

hawkingrei
Copy link
Member

@hawkingrei hawkingrei commented Feb 26, 2024

What problem does this PR solve?

Issue Number: close #51222

Problem Summary:

What changed and how does it work?

before bugfix, process looks like this.

In (Row(..), Row(..)) =>In  (Row(..),Row(..))
In (Row(..), Row(..), Row(..)) =>In  (Row(..),Row(..),Row(..))

so we cannot bind the SQL with In ((..),(..))

after bugfix. it can work.

In (Row(..), Row(..)) =>In  (...)
In (Row(..), Row(..), Row(..)) =>In  (...)

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 do-not-merge/needs-tests-checked do-not-merge/needs-triage-completed 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. and removed do-not-merge/needs-tests-checked labels Feb 26, 2024
@hawkingrei
Copy link
Member Author

/check-issue-triage-complete

Copy link

codecov bot commented Feb 26, 2024

Codecov Report

Merging #51319 (495ad6b) into master (3c3ba00) will increase coverage by 1.7614%.
Report is 7 commits behind head on master.
The diff coverage is 65.5737%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #51319        +/-   ##
================================================
+ Coverage   70.6318%   72.3933%   +1.7614%     
================================================
  Files          1460       1462         +2     
  Lines        434706     439089      +4383     
================================================
+ Hits         307041     317871     +10830     
+ Misses       108410     101171      -7239     
- Partials      19255      20047       +792     
Flag Coverage Δ
integration 49.0879% <45.9016%> (?)
unit 70.3380% <65.5737%> (-0.0962%) ⬇️

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

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

@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 Feb 26, 2024
@hawkingrei hawkingrei changed the title parser: support (Row(..),Row(..))=>(..) parser: support (Row(..),Row(..))=>(..) in binding mode Feb 26, 2024
@hawkingrei hawkingrei changed the title parser: support (Row(..),Row(..))=>(..) in binding mode parser: support (Row(..),Row(..))=>(..) in the binding mode Feb 26, 2024
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Feb 27, 2024
Signed-off-by: Weizhen Wang <[email protected]>
Copy link
Contributor

@elsa0520 elsa0520 left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Feb 27, 2024
Copy link

ti-chi-bot bot commented Feb 27, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-02-27 06:58:52.935628936 +0000 UTC m=+945221.683252045: ☑️ agreed by qw4990.
  • 2024-02-27 07:28:23.901563651 +0000 UTC m=+946992.649186748: ☑️ agreed by elsa0520.

@hawkingrei hawkingrei requested a review from tangenta February 27, 2024 07:35
Copy link
Contributor

@D3Hunter D3Hunter left a comment

Choose a reason for hiding this comment

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

rest lgtm

normalized string
digest string
}{
{"select 1 from b where (x,y) in ((1, 3), ('3', 1))", "select ? from `b` where row ( `x` , `y` ) in ( ... )", "ab6c607d118c24030807f8d1c7c846ec23e3b752fd88ed763bb8e26fbfa56a83"},
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 just replace literal with ?? such as "select ? from b where (x,y) in ((?, ?), (?, ?)), should be simplier to implement.

Copy link
Member Author

Choose a reason for hiding this comment

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

It is not binding mode. In binding mode, It must be select ? from b where (x,y) in (...).

Copy link

ti-chi-bot bot commented Feb 27, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: D3Hunter, elsa0520, qw4990

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 Feb 27, 2024
@hawkingrei
Copy link
Member Author

/retest

@ti-chi-bot ti-chi-bot bot merged commit 707b0a4 into pingcap:master Feb 27, 2024
23 of 24 checks passed
@hawkingrei
Copy link
Member Author

/cherrypick release-7.5
/cherrypick release-7.1

@ti-chi-bot
Copy link
Member

@hawkingrei: new pull request created to branch release-7.1: #51364.

In response to this:

/cherrypick release-7.5
/cherrypick release-7.1

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 ti-community-infra/tichi repository.

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

@hawkingrei: new pull request created to branch release-7.5: #51365.

In response to this:

/cherrypick release-7.5
/cherrypick release-7.1

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 ti-community-infra/tichi repository.

@lmduean
Copy link

lmduean commented Feb 27, 2024

It seems like you haven't considered the compatibility issues when upgrading.
@hawkingrei

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
6 participants