Skip to content

parser: Support VECTOR type#54246

Merged
ti-chi-bot[bot] merged 2 commits into
pingcap:masterfrom
breezewish:wenxuan/vector/parser
Jun 27, 2024
Merged

parser: Support VECTOR type#54246
ti-chi-bot[bot] merged 2 commits into
pingcap:masterfrom
breezewish:wenxuan/vector/parser

Conversation

@breezewish
Copy link
Copy Markdown
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

Signed-off-by: Wish <breezewish@outlook.com>
@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
@codecov
Copy link
Copy Markdown

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 <breezewish@outlook.com>
@bb7133
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown

easonn7 commented Jun 27, 2024

/approve

@breezewish
Copy link
Copy Markdown
Member Author

/merge

@ti-chi-bot
Copy link
Copy Markdown

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

Details

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
Copy Markdown

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
@ti-chi-bot
Copy link
Copy Markdown

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.

@ti-chi-bot
Copy link
Copy Markdown

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

Details

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
@ti-chi-bot
Copy link
Copy Markdown

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

Details

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
Copy Markdown

easonn7 commented Jun 27, 2024

/approve

@ti-chi-bot
Copy link
Copy Markdown

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

Details 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
Copy Markdown
Member Author

/merge

@ti-chi-bot
Copy link
Copy Markdown

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

Details

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
@breezewish breezewish deleted the wenxuan/vector/parser branch June 27, 2024 08:41
@dveeden
Copy link
Copy Markdown
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
Copy Markdown
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

budney pushed a commit to budney/tidb that referenced this pull request May 18, 2025
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