You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datafusion.apache.org by lu...@apache.org on 2026/10/17 13:47:58 UTC
(datafusion-sqlparser-rs) branch engine-name-quoting updated (70cd655ae -> d64869e6e)
This is an automated email from the ASF dual-hosted git repository.
LucaCappelletti94 pushed a change to branch engine-name-quoting
in repository https://gitbox.apache.org/repos/asf/datafusion-sqlparser-rs.git
discard 70cd655ae Generic: Keep the quoting of the CREATE TABLE ENGINE name
new d64869e6e ClickHouse, MySQL: Keep the quoting of the CREATE TABLE ENGINE name
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (70cd655ae)
\
N -- N -- N refs/heads/engine-name-quoting (d64869e6e)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
tests/sqlparser_mysql.rs | 6 ++++++
1 file changed, 6 insertions(+)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datafusion.apache.org
For additional commands, e-mail: commits-help@datafusion.apache.org
(datafusion-sqlparser-rs) 01/01: ClickHouse, MySQL: Keep the quoting of the CREATE TABLE ENGINE name
Posted by lu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
LucaCappelletti94 pushed a commit to branch engine-name-quoting
in repository https://gitbox.apache.org/repos/asf/datafusion-sqlparser-rs.git
commit d64869e6ed2885631f8dd688548da3d288b0c7cc
Author: LucaCappelletti94 <ca...@gmail.com>
AuthorDate: Wed Sep 23 04:49:21 2026 +0200
ClickHouse, MySQL: Keep the quoting of the CREATE TABLE ENGINE name
---
src/parser/mod.rs | 2 +-
tests/sqlparser_clickhouse.rs | 8 ++++++++
tests/sqlparser_mysql.rs | 6 ++++++
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/src/parser/mod.rs b/src/parser/mod.rs
index 7d2006b2d..949776d03 100644
--- a/src/parser/mod.rs
+++ b/src/parser/mod.rs
@@ -9346,7 +9346,7 @@ impl<'a> Parser<'a> {
Ok(Some(SqlOption::NamedParenthesizedList(
NamedParenthesizedList {
key: Ident::new("ENGINE"),
- name: Some(Ident::new(w.value)),
+ name: Some(w.into_ident(value.span)),
values: parameters,
},
)))
diff --git a/tests/sqlparser_clickhouse.rs b/tests/sqlparser_clickhouse.rs
index 39e00bf38..189300d87 100644
--- a/tests/sqlparser_clickhouse.rs
+++ b/tests/sqlparser_clickhouse.rs
@@ -2376,3 +2376,11 @@ fn clickhouse_and_generic() -> TestedDialects {
Box::new(GenericDialect {}),
])
}
+
+#[test]
+fn parse_create_table_engine_name_quoting() {
+ clickhouse_and_generic().verified_stmt(r#"CREATE TABLE t (a INT) ENGINE = "MergeTree""#);
+ clickhouse_and_generic().verified_stmt("CREATE TABLE t (a INT) ENGINE = `MergeTree`");
+ clickhouse_and_generic().verified_stmt("CREATE TABLE t (a INT) ENGINE = ``");
+ clickhouse().verified_stmt("CREATE TABLE t (a INT) ENGINE = MergeTree");
+}
diff --git a/tests/sqlparser_mysql.rs b/tests/sqlparser_mysql.rs
index 13c27d661..8baa83b6b 100644
--- a/tests/sqlparser_mysql.rs
+++ b/tests/sqlparser_mysql.rs
@@ -5196,3 +5196,9 @@ fn parse_alter_table_column_position() {
);
}
}
+
+#[test]
+fn parse_create_table_engine_name_quoting() {
+ mysql_and_generic().verified_stmt("CREATE TABLE t (a INT) ENGINE = `InnoDB`");
+ mysql_and_generic().verified_stmt("CREATE TABLE t (a INT) ENGINE = InnoDB");
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datafusion.apache.org
For additional commands, e-mail: commits-help@datafusion.apache.org