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 VECTOR type #54246

Merged
merged 2 commits into from
Jun 27, 2024
Merged

Conversation

breezewish
Copy link
Member

What problem does this PR solve?

Issue Number: ref #54245

Problem Summary:

What changed and how does it work?

Support parsing the VECTOR type. However we does not support execute it.

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. sig/planner SIG: Planner size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jun 26, 2024
Copy link

codecov bot commented Jun 26, 2024

Codecov Report

Attention: Patch coverage is 43.75000% with 9 lines in your changes missing coverage. Please review.

Project coverage is 54.9661%. Comparing base (432bb79) to head (108e0e1).
Report is 3 commits behind head on master.

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #54246         +/-   ##
=================================================
- Coverage   72.9282%   54.9661%   -17.9621%     
=================================================
  Files          1523       1642        +119     
  Lines        435564     607228     +171664     
=================================================
+ Hits         317649     333770      +16121     
- Misses        98420     250958     +152538     
- Partials      19495      22500       +3005     
Flag Coverage Δ
integration 20.9902% <0.0000%> (?)
unit 71.8155% <43.7500%> (-0.1281%) ⬇️

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

Components Coverage Δ
dumpling 52.9656% <ø> (ø)
parser ∅ <ø> (∅)
br 46.5318% <ø> (+0.3632%) ⬆️

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jun 27, 2024
Signed-off-by: Wish <[email protected]>
@bb7133
Copy link
Member

bb7133 commented Jun 27, 2024

Hi @hawkingrei @breezewish are we going to support vector in the next release(v8.3.0)?

@breezewish
Copy link
Member Author

@bb7133 Hi, the VECTOR type support is planned this Q, but we have not estimated work time for it yet.

@easonn7
Copy link

easonn7 commented Jun 27, 2024

/approve

@breezewish
Copy link
Member Author

/merge

Copy link

ti-chi-bot bot commented Jun 27, 2024

@breezewish: We have migrated to builtin LGTM and approve plugins for reviewing.

👉 Please use /approve when you want approve this pull request.

The changes announcement: LGTM plugin changes

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.

@easonn7
Copy link

easonn7 commented Jun 27, 2024

/approve

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

ti-chi-bot bot commented Jun 27, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-06-27 00:03:23.380495342 +0000 UTC m=+850729.865984170: ☑️ agreed by hawkingrei.
  • 2024-06-27 07:04:37.481767545 +0000 UTC m=+876003.967256379: ☑️ agreed by crazycs520.

Copy link

ti-chi-bot bot commented Jun 27, 2024

@breezewish: We have migrated to builtin LGTM and approve plugins for reviewing.

👉 Please use /approve when you want approve this pull request.

The changes announcement: LGTM plugin changes

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.

1 similar comment
Copy link

ti-chi-bot bot commented Jun 27, 2024

@breezewish: We have migrated to builtin LGTM and approve plugins for reviewing.

👉 Please use /approve when you want approve this pull request.

The changes announcement: LGTM plugin changes

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.

@easonn7
Copy link

easonn7 commented Jun 27, 2024

/approve

Copy link

ti-chi-bot bot commented Jun 27, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: crazycs520, easonn7, hawkingrei, tangenta, 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 27, 2024
@breezewish
Copy link
Member Author

/merge

Copy link

ti-chi-bot bot commented Jun 27, 2024

@breezewish: We have migrated to builtin LGTM and approve plugins for reviewing.

👉 Please use /approve when you want approve this pull request.

The changes announcement: LGTM plugin changes

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 ti-chi-bot bot merged commit 14ed0c0 into pingcap:master Jun 27, 2024
23 checks passed
@breezewish breezewish deleted the wenxuan/vector/parser branch June 27, 2024 08:41
@dveeden
Copy link
Contributor

dveeden commented Jul 1, 2024

@breezewish Looks like somehow keywords.go wasn't updated?

dvaneeden@dve-carbon:~/dev/pingcap/tidb/pkg/parser$ make 
GO111MODULE=on go build -o bin/goyacc goyacc/main.go goyacc/format_yacc.go
gofmt (simplify)
bin/goyacc -o parser.go -p yy -t Parser parser.y
Parse table entries: 3306781 of 7804360, x 16 bits == 6613562 bytes
bin/goyacc -o hintparser.go -p yyhint -t hintParser hintparser.y
Parse table entries: 25978 of 42344, x 16 bits == 51956 bytes
go generate
dvaneeden@dve-carbon:~/dev/pingcap/tidb/pkg/parser$ git diff
diff --git a/pkg/parser/keywords.go b/pkg/parser/keywords.go
index 74dc5a1b32..004d51d661 100644
--- a/pkg/parser/keywords.go
+++ b/pkg/parser/keywords.go
@@ -622,6 +622,7 @@ var Keywords = []KeywordsType{
        {"VALIDATION", false, "unreserved"},
        {"VALUE", false, "unreserved"},
        {"VARIABLES", false, "unreserved"},
+       {"VECTOR", false, "unreserved"},
        {"VIEW", false, "unreserved"},
        {"VISIBLE", false, "unreserved"},
        {"WAIT", false, "unreserved"},

@breezewish
Copy link
Member Author

breezewish commented Jul 1, 2024

@breezewish Looks like somehow keywords.go wasn't updated?

dvaneeden@dve-carbon:~/dev/pingcap/tidb/pkg/parser$ make 
GO111MODULE=on go build -o bin/goyacc goyacc/main.go goyacc/format_yacc.go
gofmt (simplify)
bin/goyacc -o parser.go -p yy -t Parser parser.y
Parse table entries: 3306781 of 7804360, x 16 bits == 6613562 bytes
bin/goyacc -o hintparser.go -p yyhint -t hintParser hintparser.y
Parse table entries: 25978 of 42344, x 16 bits == 51956 bytes
go generate
dvaneeden@dve-carbon:~/dev/pingcap/tidb/pkg/parser$ git diff
diff --git a/pkg/parser/keywords.go b/pkg/parser/keywords.go
index 74dc5a1b32..004d51d661 100644
--- a/pkg/parser/keywords.go
+++ b/pkg/parser/keywords.go
@@ -622,6 +622,7 @@ var Keywords = []KeywordsType{
        {"VALIDATION", false, "unreserved"},
        {"VALUE", false, "unreserved"},
        {"VARIABLES", false, "unreserved"},
+       {"VECTOR", false, "unreserved"},
        {"VIEW", false, "unreserved"},
        {"VISIBLE", false, "unreserved"},
        {"WAIT", false, "unreserved"},

@dveeden Thanks for pointing out! A fix for the keyword (and a fix to prevent future mistakes) are now proposed in #54371

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. sig/planner SIG: Planner 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.

8 participants