From b705ead9ea44165dc8238bc43925af1fed505f36 Mon Sep 17 00:00:00 2001 From: duanzhengqiang Date: Mon, 2 Dec 2024 10:15:09 +0800 Subject: [PATCH 1/2] Fix mysql range parse error when use table owner --- .../src/main/antlr4/imports/mysql/BaseRule.g4 | 1 + .../src/main/resources/case/dml/select.xml | 24 +++++++++++++++++++ .../resources/sql/supported/dml/select.xml | 1 + 3 files changed, 26 insertions(+) diff --git a/parser/sql/dialect/mysql/src/main/antlr4/imports/mysql/BaseRule.g4 b/parser/sql/dialect/mysql/src/main/antlr4/imports/mysql/BaseRule.g4 index 80f220c5933f8..77d80dbd1d607 100644 --- a/parser/sql/dialect/mysql/src/main/antlr4/imports/mysql/BaseRule.g4 +++ b/parser/sql/dialect/mysql/src/main/antlr4/imports/mysql/BaseRule.g4 @@ -63,6 +63,7 @@ customKeyword | MAXVALUE | BIT_XOR | MYSQL_MAIN + | RANGE | UTC_DATE | UTC_TIME | UTC_TIMESTAMP diff --git a/test/it/parser/src/main/resources/case/dml/select.xml b/test/it/parser/src/main/resources/case/dml/select.xml index 666af28c1cddc..98ecf3f3c22aa 100644 --- a/test/it/parser/src/main/resources/case/dml/select.xml +++ b/test/it/parser/src/main/resources/case/dml/select.xml @@ -9960,4 +9960,28 @@ + + diff --git a/test/it/parser/src/main/resources/sql/supported/dml/select.xml b/test/it/parser/src/main/resources/sql/supported/dml/select.xml index 4dc0dbf2139d2..f6ace55e504bd 100644 --- a/test/it/parser/src/main/resources/sql/supported/dml/select.xml +++ b/test/it/parser/src/main/resources/sql/supported/dml/select.xml @@ -311,4 +311,5 @@ + From 4bebe4bdb0973e7862a05e8b7d49daba71a1c719 Mon Sep 17 00:00:00 2001 From: duanzhengqiang Date: Mon, 2 Dec 2024 10:17:29 +0800 Subject: [PATCH 2/2] Update release note --- RELEASE-NOTES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 5f24ed3c35fca..29ed83b447513 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -48,6 +48,7 @@ 1. SQL Parser: Fix mysql parse zone unreserved keyword error - [#33720](https://github.com/apache/shardingsphere/pull/33720) 1. Proxy: Fix BatchUpdateException when execute INSERT INTO ON DUPLICATE KEY UPDATE in proxy adapter - [#33796](https://github.com/apache/shardingsphere/pull/33796) 1. Infra: Fix the issue that ShardingSphere cannot connect to HiveServer2 using remote Hive Metastore Server - [#33837](https://github.com/apache/shardingsphere/pull/33837) +1. SQL Parser: Fix mysql range parse error when use table owner - [#33874](https://github.com/apache/shardingsphere/pull/33874) ### Change Logs