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

Issue 33719 Adding non-reserved keywords in MySQL BaseRule.g4 grammar file according to MySQL 8.4 doc #33846

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
1. SQL Parser: Support parsing Doris BITXOR - [#33258](https://github.com/apache/shardingsphere/pull/33258)
1. SQL Parser: Support parsing Doris INSTR - [#33289](https://github.com/apache/shardingsphere/pull/33289)
1. SQL Parser: Support parsing Doris STRRIGHT - [#33393](https://github.com/apache/shardingsphere/pull/33393)
1. SQL Parser: Support parsing MySQL by adding non-reserved keywords in BaseRule.g4 file according to MySQL 8.4 doc - [#33846](https://github.com/apache/shardingsphere/pull/33846)
1. SQL Federation: Upgrade calcite version to 1.38.0 and update all license info in LICENSE file - [#33279](https://github.com/apache/shardingsphere/pull/33279)
1. JDBC: Add show database name for JDBC when execute SHOW COMPUTE NODES - [#33437](https://github.com/apache/shardingsphere/pull/33437)
1. JDBC: Support ZonedDateTime on ResultSet - [#33660](https://github.com/apache/shardingsphere/issues/33660)
Expand Down
23 changes: 23 additions & 0 deletions parser/sql/dialect/mysql/src/main/antlr4/imports/mysql/BaseRule.g4
Original file line number Diff line number Diff line change
Expand Up @@ -145,22 +145,28 @@ identifierKeywordsUnambiguous
| ATTRIBUTE
| AUTOEXTEND_SIZE
| AUTO_INCREMENT
| AUTHENTICATION
| AUTO
| AVG_ROW_LENGTH
| AVG
| BACKUP
| BEFORE
| BERNOULLI
| BINLOG
| BIT
| BINLOGBIT
| BLOCK
| BOOLEAN
| BOOL
| BTREE
| BUCKETS
| BULK
| CASCADED
| CATALOG_NAME
| CHAIN
| CHANGED
| CHANNEL
| CHALLENGE_RESPONSECHANGED
| CIPHER
| CLASS_ORIGIN
| CLIENT
Expand Down Expand Up @@ -234,6 +240,7 @@ identifierKeywordsUnambiguous
| FAULTS
| FILE_BLOCK_SIZE
| FILTER
| FINISH
| FIRST
| FIXED
| FOLLOWING
Expand All @@ -248,6 +255,7 @@ identifierKeywordsUnambiguous
| GRANTS
| GROUP_REPLICATION
| GROUPS
| GTIDS
| HASH
| HISTOGRAM
| HISTORY
Expand All @@ -258,6 +266,7 @@ identifierKeywordsUnambiguous
| IGNORE_SERVER_IDS
| INACTIVE
| INDEXES
| INITIAL
| INITIAL_SIZE
| INSERT_METHOD
| INSTANCE
Expand All @@ -272,6 +281,8 @@ identifierKeywordsUnambiguous
| KEY
| KEYS
| KEY_BLOCK_SIZE
| KEYRING
| KILL
| LAST
| LEAVES
| LESS
Expand All @@ -282,6 +293,10 @@ identifierKeywordsUnambiguous
| LOCKS
| LOGFILE
| LOGS
| LOOP
| MANUAL
| MATCH
| MAXVALUE
| MASTER_AUTO_POSITION
| MASTER_COMPRESSION_ALGORITHM
| MASTER_CONNECT_RETRY
Expand Down Expand Up @@ -326,6 +341,7 @@ identifierKeywordsUnambiguous
| MIN_ROWS
| MODE
| MODIFY
| MODIFIES
| MONTH
| MULTILINESTRING
| MULTIPOINT
Expand All @@ -335,6 +351,7 @@ identifierKeywordsUnambiguous
| NAMES
| NAME
| NATIONAL
| NATURAL
| NCHAR
| NDBCLUSTER
| NESTED
Expand All @@ -347,6 +364,7 @@ identifierKeywordsUnambiguous
| NULLS
| NUMBER
| NVARCHAR
| OF
| OFF
| OFFSET
| OJ
Expand All @@ -364,6 +382,7 @@ identifierKeywordsUnambiguous
| PAGE
| PARSER
| PARTIAL
| PARSE_TREE
| PARTITIONING
| PARTITIONS
| PASSWORD
Expand All @@ -384,6 +403,7 @@ identifierKeywordsUnambiguous
| PROCESSLIST
| PROFILES
| PROFILE
| QUALIFY
| QUARTER
| QUERY
| QUICK
Expand Down Expand Up @@ -417,6 +437,7 @@ identifierKeywordsUnambiguous
| RESTORE
| RESUME
| RETAIN
| REGISTRATION
| RETURNED_SQLSTATE
| RETURNING
| RETURNS
Expand All @@ -429,6 +450,7 @@ identifierKeywordsUnambiguous
| ROW_COUNT
| ROW_FORMAT
| RTREE
| S3
| SCHEDULE
| SCHEMA_NAME
| SECONDARY_ENGINE
Expand Down Expand Up @@ -503,6 +525,7 @@ identifierKeywordsUnambiguous
| UNKNOWN
| UNTIL
| UPGRADE
| URL
| USER
| USE_FRM
| VALIDATION
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,14 @@ AUTOEXTEND_SIZE
: A U T O E X T E N D UL_ S I Z E
;

AUTHENTICATION
: A U T H E N T I C A T I O N
;

AUTO
: A U T O
;

AUTO_INCREMENT
: A U T O UL_ I N C R E M E N T
;
Expand Down Expand Up @@ -143,6 +151,10 @@ BEFORE
: B E F O R E
;

BERNOULLI
: B E R N O U L L I
;

BEGIN
: B E G I N
;
Expand All @@ -167,6 +179,10 @@ BIT
: B I T
;

BINLOGBIT
: B I N L O G B I T
;

BLOB
: B L O B
;
Expand Down Expand Up @@ -195,6 +211,10 @@ BUCKETS
: B U C K E T S
;

BULK
: B U L K
;

BY
: B Y
;
Expand Down Expand Up @@ -243,6 +263,10 @@ CHANNEL
: C H A N N E L
;

CHALLENGE_RESPONSECHANGED
: C H A L L E N G E UL_ R E S P O N S E C H A N G E D
;

CHAR
: C H A R
;
Expand Down Expand Up @@ -787,6 +811,10 @@ FILTER
: F I L T E R
;

FINISH
: F I N I S H
;

FIRST
: F I R S T
;
Expand Down Expand Up @@ -915,6 +943,10 @@ GROUPS
: G R O U P S
;

GTIDS
: G T I D S
;

GROUP_REPLICATION
: G R O U P UL_ R E P L I C A T I O N
;
Expand Down Expand Up @@ -1019,6 +1051,10 @@ INDEXES
: I N D E X E S
;

INITIAL
: I N I T I A L
;

INFILE
: I N F I L E
;
Expand Down Expand Up @@ -1171,6 +1207,10 @@ KILL
: K I L L
;

KEYRING
: K E Y R I N G
;

LAG
: L A G
;
Expand Down Expand Up @@ -1419,10 +1459,14 @@ MASTER_ZSTD_COMPRESSION_LEVEL
: M A S T E R UL_ Z S T D UL_ C O M P R E S S I O N UL_ L E V E L
;

MATCH
: M A T C H
MANUAL
: M A N U A L
;

MATCH
: M A T C H
;

MAXVALUE
: M A X V A L U E
;
Expand Down Expand Up @@ -1787,6 +1831,10 @@ PARTIAL
: P A R T I A L
;

PARSE_TREE
: P A R S E UL_ T R E E
;

PARTITION
: P A R T I T I O N
;
Expand Down Expand Up @@ -1915,6 +1963,10 @@ PURGE
: P U R G E
;

QUALIFY
: Q U A L I F Y
;

QUARTER
: Q U A R T E R
;
Expand Down Expand Up @@ -2135,6 +2187,10 @@ RETAIN
: R E T A I N
;

REGISTRATION
: R E G I S T R A T I O N
;

RETURN
: R E T U R N
;
Expand Down Expand Up @@ -2215,6 +2271,10 @@ RTREE
: R T R E E
;

S3
: S '3'
;

SAVEPOINT
: S A V E P O I N T
;
Expand Down Expand Up @@ -2871,6 +2931,10 @@ USE
: U S E
;

URL
: U R L
;

USER
: U S E R
;
Expand Down
Loading