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: Add FLOAT4,FLOAT8 and MIDDLEINT compatibility types #46649

Merged
merged 2 commits into from
Sep 7, 2023

Conversation

dveeden
Copy link
Contributor

@dveeden dveeden commented Sep 4, 2023

What problem does this PR solve?

Issue Number: close #46648

Problem Summary:

What is changed and how it works?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

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.

Add FLOAT4, FLOAT8 and MIDDLEINT compatibility data types

@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 Sep 4, 2023
@tiprow
Copy link

tiprow bot commented Sep 4, 2023

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

@codecov
Copy link

codecov bot commented Sep 4, 2023

Codecov Report

Merging #46649 (4f5e928) into master (587eacf) will decrease coverage by 1.0208%.
Report is 36 commits behind head on master.
The diff coverage is n/a.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #46649        +/-   ##
================================================
- Coverage   73.3528%   72.3321%   -1.0208%     
================================================
  Files          1314       1341        +27     
  Lines        395386     410447     +15061     
================================================
+ Hits         290027     296885      +6858     
- Misses        86897      94795      +7898     
- Partials      18462      18767       +305     
Flag Coverage Δ
integration 28.3481% <ø> (?)
unit 73.5037% <ø> (+0.1508%) ⬆️

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

Components Coverage Δ
dumpling 54.0444% <ø> (ø)
parser 85.0515% <ø> (+0.0995%) ⬆️
br 49.2187% <ø> (-3.0871%) ⬇️

Copy link
Contributor

@mjonss mjonss left a comment

Choose a reason for hiding this comment

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

Should these new types also be added as keyworks somewhere?

Otherwise LGTM.

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Sep 4, 2023
@dveeden
Copy link
Contributor Author

dveeden commented Sep 5, 2023

Should these new types also be added as keyworks somewhere?

This was added in the ReservedKeyword section, just like INT1, INT2, etc.

$ awk '/The following tokens belong to ReservedKeyword/ { kw=1 } /^$/ { kw=0 } { if (kw && $2 ~ /"(FLOAT[48]|INT[0-9]|MIDDLEINT)"/) { print }}' parser/parser.y 
	float4Type        "FLOAT4"
	float8Type        "FLOAT8"
	int1Type          "INT1"
	int2Type          "INT2"
	int3Type          "INT3"
	int4Type          "INT4"
	int8Type          "INT8"
	middleIntType     "MIDDLEINT"

Some info from MySQL 8.1.0 on this:

sql> SELECT * FROM information_schema.keywords WHERE WORD IN ('BOOL','BOOLEAN','FIXED','FLOAT4','FLOAT8','INT1','INT2','INT3','INT4','INT8','LONG','MIDDLEINT','NUMERIC');
+-----------+----------+
| WORD      | RESERVED |
+-----------+----------+
| BOOL      |        0 |
| BOOLEAN   |        0 |
| FIXED     |        0 |
| FLOAT4    |        1 |
| FLOAT8    |        1 |
| INT1      |        1 |
| INT2      |        1 |
| INT3      |        1 |
| INT4      |        1 |
| INT8      |        1 |
| LONG      |        1 |
| MIDDLEINT |        1 |
| NUMERIC   |        1 |
+-----------+----------+
13 rows in set (0.0019 sec)

Note that there is an open item for information_schema.keywords on #7968

@dveeden
Copy link
Contributor Author

dveeden commented Sep 5, 2023

/retest

@tiprow
Copy link

tiprow bot commented Sep 5, 2023

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

In response to this:

/retest

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.

@dveeden
Copy link
Contributor Author

dveeden commented Sep 5, 2023

/ok-to-test

@ti-chi-bot ti-chi-bot bot added the ok-to-test Indicates a PR is ready to be tested. label Sep 5, 2023
Copy link
Member

@bb7133 bb7133 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 Sep 6, 2023
@ti-chi-bot
Copy link

ti-chi-bot bot commented Sep 6, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-09-04 15:11:43.662602059 +0000 UTC m=+2371868.211618047: ☑️ agreed by mjonss.
  • 2023-09-06 07:37:40.11211636 +0000 UTC m=+2517424.661132346: ☑️ agreed by bb7133.

Copy link

@yudongusa yudongusa left a comment

Choose a reason for hiding this comment

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

LGTM as there is no config or variable changes.

@ti-chi-bot
Copy link

ti-chi-bot bot commented Sep 7, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bb7133, mjonss, yudongusa

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 Sep 7, 2023
@dveeden dveeden merged commit 275f350 into pingcap:master Sep 7, 2023
7 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm ok-to-test Indicates a PR is ready to be tested. 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.

need get float8 type suopport
5 participants