This is an automated email from the ASF dual-hosted git repository.
zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 6acafad0a5b Add SQL parser test cases for SQL92 (#37725)
6acafad0a5b is described below
commit 6acafad0a5bad31da6134d443217e00f328a6ded
Author: Liang Zhang <[email protected]>
AuthorDate: Tue Jan 13 16:49:29 2026 +0800
Add SQL parser test cases for SQL92 (#37725)
---
.../src/main/resources/case/ddl/create-table.xml | 26 ++++
.../parser/src/main/resources/case/dml/delete.xml | 4 +
.../main/resources/case/dml/select-expression.xml | 28 ++++
.../src/main/resources/case/dml/select-join.xml | 123 +++++++++++++++++
.../main/resources/case/dml/select-order-by.xml | 15 +++
.../parser/src/main/resources/case/dml/select.xml | 146 +++++++++++++++++++++
.../parser/src/main/resources/case/dml/update.xml | 16 +++
.../resources/sql/supported/ddl/create-table.xml | 1 +
.../main/resources/sql/supported/dml/delete.xml | 1 +
.../sql/supported/dml/select-expression.xml | 1 +
.../resources/sql/supported/dml/select-join.xml | 3 +
.../sql/supported/dml/select-order-by.xml | 1 +
.../main/resources/sql/supported/dml/select.xml | 7 +
.../main/resources/sql/supported/dml/update.xml | 1 +
14 files changed, 373 insertions(+)
diff --git a/test/it/parser/src/main/resources/case/ddl/create-table.xml
b/test/it/parser/src/main/resources/case/ddl/create-table.xml
index 3f8b11d069b..327f93a0fe3 100644
--- a/test/it/parser/src/main/resources/case/ddl/create-table.xml
+++ b/test/it/parser/src/main/resources/case/ddl/create-table.xml
@@ -559,6 +559,32 @@
<column name="column3" />
</column-definition>
</create-table>
+
+ <create-table sql-case-id="create_table_with_inline_foreign_key_sql92">
+ <table name="t_order_item" start-index="13" stop-index="24" />
+ <column-definition type="INT" start-index="27" stop-index="37">
+ <column name="item_id" />
+ </column-definition>
+ <column-definition type="INT" start-index="40" stop-index="117">
+ <column name="order_id" />
+ <referenced-table name="t_order" start-index="64" stop-index="70"
/>
+ </column-definition>
+ <column-definition type="INT" start-index="120" stop-index="130">
+ <column name="user_id" />
+ </column-definition>
+ <column-definition type="VARCHAR" start-index="133" stop-index="150">
+ <column name="status" />
+ </column-definition>
+ <column-definition type="VARCHAR" start-index="153" stop-index="171">
+ <column name="column1" />
+ </column-definition>
+ <column-definition type="VARCHAR" start-index="174" stop-index="192">
+ <column name="column2" />
+ </column-definition>
+ <column-definition type="VARCHAR" start-index="195" stop-index="213">
+ <column name="column3" />
+ </column-definition>
+ </create-table>
<create-table sql-case-id="create_table_with_inline_constraints">
<table name="t_order" start-index="13" stop-index="19" />
diff --git a/test/it/parser/src/main/resources/case/dml/delete.xml
b/test/it/parser/src/main/resources/case/dml/delete.xml
index 6e4f615b6e0..a597f2cdbfd 100644
--- a/test/it/parser/src/main/resources/case/dml/delete.xml
+++ b/test/it/parser/src/main/resources/case/dml/delete.xml
@@ -870,4 +870,8 @@
</expr>
</where>
</delete>
+
+ <delete sql-case-id="delete_without_where_sql92">
+ <table name="t_order" start-index="12" stop-index="18" />
+ </delete>
</sql-parser-test-cases>
diff --git a/test/it/parser/src/main/resources/case/dml/select-expression.xml
b/test/it/parser/src/main/resources/case/dml/select-expression.xml
index 1c5c7478cd1..8c028a3921a 100644
--- a/test/it/parser/src/main/resources/case/dml/select-expression.xml
+++ b/test/it/parser/src/main/resources/case/dml/select-expression.xml
@@ -1289,6 +1289,34 @@
</where>
</select>
+ <select sql-case-id="select_where_with_predicate_with_not_like_sql92">
+ <from start-index="14" stop-index="20">
+ <simple-table name="t_order" start-index="14" stop-index="20" />
+ </from>
+ <projections distinct-row="false" start-index="7" stop-index="7">
+ <shorthand-projection start-index="7" stop-index="7" />
+ </projections>
+ <where start-index="22" stop-index="55">
+ <expr>
+ <binary-operation-expression start-index="28" stop-index="55">
+ <left>
+ <column name="status" start-index="28" stop-index="41">
+ <owner name="t_order" start-index="28"
stop-index="34" />
+ </column>
+ </left>
+ <operator>NOT LIKE</operator>
+ <right>
+ <list-expression start-index="52" stop-index="55">
+ <items>
+ <literal-expression value="1%"
start-index="52" stop-index="55" />
+ </items>
+ </list-expression>
+ </right>
+ </binary-operation-expression>
+ </expr>
+ </where>
+ </select>
+
<select sql-case-id="select_where_with_predicate_with_regexp">
<from start-index="14" stop-index="20">
<simple-table name="t_order" start-index="14" stop-index="20" />
diff --git a/test/it/parser/src/main/resources/case/dml/select-join.xml
b/test/it/parser/src/main/resources/case/dml/select-join.xml
index 131c3b0bfe3..7aa9081259d 100644
--- a/test/it/parser/src/main/resources/case/dml/select-join.xml
+++ b/test/it/parser/src/main/resources/case/dml/select-join.xml
@@ -150,6 +150,41 @@
</where>
</select>
+ <select sql-case-id="select_join_using_sql92" parameters="1000">
+ <from>
+ <join-table join-type="INNER">
+ <left>
+ <simple-table name="t_order" alias="o" start-index="16"
stop-index="24" />
+ </left>
+ <right>
+ <simple-table name="t_order_item" alias="i"
start-index="31" stop-index="44" />
+ </right>
+ <using-columns name="order_id" start-index="52"
stop-index="59" />
+ </join-table>
+ </from>
+ <projections start-index="7" stop-index="9">
+ <shorthand-projection start-index="7" stop-index="9">
+ <owner name="i" start-index="7" stop-index="7" />
+ </shorthand-projection>
+ </projections>
+ <where start-index="62" stop-index="81" literal-stop-index="84">
+ <expr>
+ <binary-operation-expression start-index="68" stop-index="81"
literal-stop-index="84">
+ <left>
+ <column name="order_id" start-index="68"
stop-index="77">
+ <owner name="o" start-index="68" stop-index="68" />
+ </column>
+ </left>
+ <operator>=</operator>
+ <right>
+ <literal-expression value="1000" start-index="81"
stop-index="84" />
+ <parameter-marker-expression parameter-index="0"
start-index="81" stop-index="81" />
+ </right>
+ </binary-operation-expression>
+ </expr>
+ </where>
+ </select>
+
<select sql-case-id="select_left_outer_join_related_with_alias">
<from>
<join-table join-type="LEFT">
@@ -194,6 +229,50 @@
</order-by>
</select>
+ <select sql-case-id="select_left_outer_join_related_with_alias_sql92">
+ <from>
+ <join-table join-type="LEFT">
+ <left>
+ <simple-table name="departments" alias="d"
start-index="41" stop-index="53" />
+ </left>
+ <right>
+ <simple-table name="employees" alias="e" start-index="71"
stop-index="81" />
+ </right>
+ <on-condition>
+ <binary-operation-expression start-index="86"
stop-index="118">
+ <left>
+ <column name="department_id" start-index="86"
stop-index="100">
+ <owner name="d" start-index="86"
stop-index="86" />
+ </column>
+ </left>
+ <operator>=</operator>
+ <right>
+ <column name="department_id" start-index="104"
stop-index="118">
+ <owner name="e" start-index="104"
stop-index="104" />
+ </column>
+ </right>
+ </binary-operation-expression>
+ </on-condition>
+ </join-table>
+ </from>
+ <projections start-index="7" stop-index="34">
+ <column-projection name="department_id" start-index="7"
stop-index="21">
+ <owner name="d" start-index="7" stop-index="7" />
+ </column-projection>
+ <column-projection name="last_name" start-index="24"
stop-index="34">
+ <owner name="e" start-index="24" stop-index="24" />
+ </column-projection>
+ </projections>
+ <order-by>
+ <column-item name="department_id" start-index="129"
stop-index="143">
+ <owner name="d" start-index="129" stop-index="129" />
+ </column-item>
+ <column-item name="last_name" start-index="146" stop-index="156">
+ <owner name="e" start-index="146" stop-index="146" />
+ </column-item>
+ </order-by>
+ </select>
+
<select sql-case-id="select_right_outer_join_related_with_alias">
<from>
<join-table join-type="RIGHT">
@@ -238,6 +317,50 @@
</order-by>
</select>
+ <select sql-case-id="select_right_outer_join_related_with_alias_sql92">
+ <from>
+ <join-table join-type="RIGHT">
+ <left>
+ <simple-table name="departments" alias="d"
start-index="41" stop-index="53" />
+ </left>
+ <right>
+ <simple-table name="employees" alias="e" start-index="72"
stop-index="82" />
+ </right>
+ <on-condition>
+ <binary-operation-expression start-index="87"
stop-index="119">
+ <left>
+ <column name="department_id" start-index="87"
stop-index="101">
+ <owner name="d" start-index="87"
stop-index="87" />
+ </column>
+ </left>
+ <operator>=</operator>
+ <right>
+ <column name="department_id" start-index="105"
stop-index="119">
+ <owner name="e" start-index="105"
stop-index="105" />
+ </column>
+ </right>
+ </binary-operation-expression>
+ </on-condition>
+ </join-table>
+ </from>
+ <projections start-index="7" stop-index="34">
+ <column-projection name="department_id" start-index="7"
stop-index="21">
+ <owner name="d" start-index="7" stop-index="7" />
+ </column-projection>
+ <column-projection name="last_name" start-index="24"
stop-index="34">
+ <owner name="e" start-index="24" stop-index="24" />
+ </column-projection>
+ </projections>
+ <order-by>
+ <column-item name="department_id" start-index="130"
stop-index="144">
+ <owner name="d" start-index="130" stop-index="130" />
+ </column-item>
+ <column-item name="last_name" start-index="147" stop-index="157">
+ <owner name="e" start-index="147" stop-index="147" />
+ </column-item>
+ </order-by>
+ </select>
+
<select sql-case-id="select_full_outer_join_related_with_alias">
<from>
<join-table join-type="FULL">
diff --git a/test/it/parser/src/main/resources/case/dml/select-order-by.xml
b/test/it/parser/src/main/resources/case/dml/select-order-by.xml
index f0e787d9181..b30d8e21aff 100644
--- a/test/it/parser/src/main/resources/case/dml/select-order-by.xml
+++ b/test/it/parser/src/main/resources/case/dml/select-order-by.xml
@@ -32,6 +32,21 @@
</order-by>
</select>
+ <select sql-case-id="select_order_by_asc_and_index_desc_sql92">
+ <from>
+ <simple-table name="t_order" alias="o" start-index="14"
stop-index="22" />
+ </from>
+ <projections start-index="7" stop-index="7">
+ <shorthand-projection start-index="7" stop-index="7" />
+ </projections>
+ <order-by>
+ <column-item name="order_id" start-index="33" stop-index="42">
+ <owner name="o" start-index="33" stop-index="33" />
+ </column-item>
+ <index-item index="2" order-direction="DESC" start-index="45"
stop-index="45" />
+ </order-by>
+ </select>
+
<select sql-case-id="select_order_by_desc_and_index_asc">
<from>
<join-table join-type="COMMA">
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 c1d7f88307b..e6e2ff86c46 100644
--- a/test/it/parser/src/main/resources/case/dml/select.xml
+++ b/test/it/parser/src/main/resources/case/dml/select.xml
@@ -8451,6 +8451,31 @@
</projections>
</select>
+ <select sql-case-id="select_not_expression_sql92">
+ <from>
+ <simple-table name="t_order" start-index="22" stop-index="28" />
+ </from>
+ <projections start-index="7" stop-index="15">
+ <expression-projection text="1=1" start-index="7" stop-index="15">
+ <expr>
+ <not-expression start-index="7" stop-index="15">
+ <expr>
+ <binary-operation-expression start-index="12"
stop-index="14">
+ <left>
+ <literal-expression value="1"
start-index="12" stop-index="12" />
+ </left>
+ <operator>=</operator>
+ <right>
+ <literal-expression value="1"
start-index="14" stop-index="14" />
+ </right>
+ </binary-operation-expression>
+ </expr>
+ </not-expression>
+ </expr>
+ </expression-projection>
+ </projections>
+ </select>
+
<select sql-case-id="select_with_unreserved_column">
<from>
<simple-table name="servers" start-index="38" stop-index="48">
@@ -12508,6 +12533,127 @@
</from>
</select>
+ <select sql-case-id="select_where_is_true_sql92">
+ <from>
+ <simple-table name="t_order" start-index="14" stop-index="20" />
+ </from>
+ <projections start-index="7" stop-index="7">
+ <shorthand-projection start-index="7" stop-index="7" />
+ </projections>
+ <where start-index="22" stop-index="41">
+ <expr>
+ <binary-operation-expression start-index="28" stop-index="41">
+ <left>
+ <column name="active" start-index="28" stop-index="33"
/>
+ </left>
+ <operator>IS</operator>
+ <right>
+ <literal-expression value="TRUE" start-index="38"
stop-index="41" />
+ </right>
+ </binary-operation-expression>
+ </expr>
+ </where>
+ </select>
+
+ <select sql-case-id="select_where_is_false_sql92">
+ <from>
+ <simple-table name="t_order" start-index="14" stop-index="20" />
+ </from>
+ <projections start-index="7" stop-index="7">
+ <shorthand-projection start-index="7" stop-index="7" />
+ </projections>
+ <where start-index="22" stop-index="42">
+ <expr>
+ <binary-operation-expression start-index="28" stop-index="42">
+ <left>
+ <column name="active" start-index="28" stop-index="33"
/>
+ </left>
+ <operator>IS</operator>
+ <right>
+ <literal-expression value="FALSE" start-index="38"
stop-index="42" />
+ </right>
+ </binary-operation-expression>
+ </expr>
+ </where>
+ </select>
+
+ <select sql-case-id="select_distinct_simple_sql92" >
+ <from>
+ <simple-table name="t_order" start-index="29" stop-index="35" />
+ </from>
+ <projections start-index="16" stop-index="22" distinct-row="true">
+ <column-projection name="user_id" start-index="16" stop-index="22"
/>
+ </projections>
+ </select>
+
+ <select sql-case-id="select_distinct_with_count_sql92">
+ <from>
+ <simple-table name="t_order" start-index="39" stop-index="45" />
+ </from>
+ <projections start-index="7" stop-index="32">
+ <aggregation-distinct-projection type="COUNT"
expression="COUNT(DISTINCT order_id)" distinct-inner-expression="order_id"
alias="c" start-index="7" stop-index="30" />
+ </projections>
+ <where start-index="47" stop-index="67">
+ <expr>
+ <binary-operation-expression start-index="53" stop-index="67">
+ <left>
+ <column name="order_id" start-index="53"
stop-index="60" />
+ </left>
+ <operator><</operator>
+ <right>
+ <literal-expression value="1100" start-index="64"
stop-index="67" />
+ </right>
+ </binary-operation-expression>
+ </expr>
+ </where>
+ </select>
+
+ <select sql-case-id="select_having_sql92">
+ <projections start-index="7" stop-index="30">
+ <column-projection name="user_id" start-index="7" stop-index="13"
/>
+ <aggregation-projection type="COUNT" expression="COUNT(*)"
start-index="16" stop-index="23" alias="cnt" />
+ </projections>
+ <from start-index="32" stop-index="43">
+ <simple-table name="t_order" start-index="37" stop-index="43" />
+ </from>
+ <group-by start-index="45" stop-index="60">
+ <column-item name="user_id" start-index="54" stop-index="60" />
+ </group-by>
+ <having start-index="62" stop-index="80">
+ <expr>
+ <binary-operation-expression start-index="69" stop-index="80">
+ <left>
+ <aggregation-projection type="COUNT"
expression="COUNT(*)" start-index="69" stop-index="76" />
+ </left>
+ <operator>></operator>
+ <right>
+ <literal-expression value="1" start-index="80"
stop-index="80" />
+ </right>
+ </binary-operation-expression>
+ </expr>
+ </having>
+ </select>
+
+ <select sql-case-id="select_cast_int_sql92">
+ <projections start-index="7" stop-index="26">
+ <expression-projection text="CAST(user_id AS INT)" start-index="7"
stop-index="26">
+ <expr>
+ <function function-name="CAST" text="CAST(user_id AS INT)"
start-index="7" stop-index="26">
+ <parameter>
+ <column name="user_id" start-index="12"
stop-index="18" />
+ </parameter>
+ <parameter>
+ <data-type value="INT" start-index="23"
stop-index="25" />
+ </parameter>
+ </function>
+ </expr>
+ </expression-projection>
+ </projections>
+ <from>
+ <simple-table name="t_order" start-index="33" stop-index="39" />
+ </from>
+ </select>
+
<select sql-case-id="select_subquery_with_with_firebird">
<projections start-index="7" stop-index="7">
<shorthand-projection start-index="7" stop-index="7" />
diff --git a/test/it/parser/src/main/resources/case/dml/update.xml
b/test/it/parser/src/main/resources/case/dml/update.xml
index f846230bb1c..eb984c1752c 100644
--- a/test/it/parser/src/main/resources/case/dml/update.xml
+++ b/test/it/parser/src/main/resources/case/dml/update.xml
@@ -264,6 +264,22 @@
</set>
</update>
+ <update sql-case-id="update_without_condition_sql92">
+ <table start-index="7" stop-index="15">
+ <simple-table name="t_order" alias="o" start-index="7"
stop-index="15" />
+ </table>
+ <set start-index="17" stop-index="41">
+ <assignment start-index="21" stop-index="41">
+ <column name="status" start-index="21" stop-index="28">
+ <owner name="o" start-index="21" stop-index="21" />
+ </column>
+ <assignment-value>
+ <literal-expression value="finished" start-index="32"
stop-index="41" />
+ </assignment-value>
+ </assignment>
+ </set>
+ </update>
+
<update sql-case-id="update_with_extra_keywords" parameters="'update', 1,
1">
<table start-index="27" stop-index="33">
<simple-table name="t_order" start-index="27" stop-index="33" />
diff --git
a/test/it/parser/src/main/resources/sql/supported/ddl/create-table.xml
b/test/it/parser/src/main/resources/sql/supported/ddl/create-table.xml
index c7d985f8606..52813c2283d 100644
--- a/test/it/parser/src/main/resources/sql/supported/ddl/create-table.xml
+++ b/test/it/parser/src/main/resources/sql/supported/ddl/create-table.xml
@@ -66,6 +66,7 @@
<sql-case id="create_table_with_inline_primary_key" value="CREATE TABLE
t_order (order_id INT PRIMARY KEY, user_id INT, status VARCHAR(10), column1
VARCHAR(10), column2 VARCHAR(10), column3 VARCHAR(10))"
db-types="MySQL,Oracle,PostgreSQL,openGauss" />
<sql-case id="create_table_with_inline_unique_key" value="CREATE TABLE
t_order (order_id INT UNIQUE, user_id INT, status VARCHAR(10), column1
VARCHAR(10), column2 VARCHAR(10), column3 VARCHAR(10))"
db-types="MySQL,Oracle,PostgreSQL,openGauss" />
<sql-case id="create_table_with_inline_foreign_key" value="CREATE TABLE
t_order_item (item_id INT, order_id INT REFERENCES t_order (order_id) ON UPDATE
CASCADE ON DELETE CASCADE, user_id INT, status VARCHAR(10), column1
VARCHAR(10), column2 VARCHAR(10), column3 VARCHAR(10))" db-types="MySQL" />
+ <sql-case id="create_table_with_inline_foreign_key_sql92" value="CREATE
TABLE t_order_item (item_id INT, order_id INT REFERENCES t_order (order_id) ON
UPDATE CASCADE ON DELETE CASCADE, user_id INT, status VARCHAR(10), column1
VARCHAR(10), column2 VARCHAR(10), column3 VARCHAR(10))" db-types="SQL92" />
<sql-case id="create_table_with_inline_constraints" value="CREATE TABLE
t_order (order_id INT PRIMARY KEY UNIQUE, user_id INT, status VARCHAR(10),
column1 VARCHAR(10), column2 VARCHAR(10), column3 VARCHAR(10))"
db-types="MySQL,Oracle,PostgreSQL,openGauss" />
<sql-case id="create_table_with_out_of_line_primary_key" value="CREATE
TABLE t_order (order_id INT, user_id INT, status VARCHAR(10), column1
VARCHAR(10), column2 VARCHAR(10), column3 VARCHAR(10), CONSTRAINT pk_order_id
PRIMARY KEY (order_id))" />
<sql-case id="create_table_with_out_of_line_composite_primary_key"
value="CREATE TABLE t_order (order_id INT, user_id INT, status VARCHAR(10),
column1 VARCHAR(10), column2 VARCHAR(10), column3 VARCHAR(10), CONSTRAINT
pk_order_id PRIMARY KEY (order_id, user_id, status))" />
diff --git a/test/it/parser/src/main/resources/sql/supported/dml/delete.xml
b/test/it/parser/src/main/resources/sql/supported/dml/delete.xml
index 8c51bbd2d8a..6bfea83ac69 100644
--- a/test/it/parser/src/main/resources/sql/supported/dml/delete.xml
+++ b/test/it/parser/src/main/resources/sql/supported/dml/delete.xml
@@ -50,4 +50,5 @@
<sql-case id="delete_rowset_function" value="DELETE FROM
OPENDATASOURCE('SQLNCLI', 'Data Source= <server_name>; Integrated
Security=SSPI').AdventureWorks2022.HumanResources.Department WHERE DepartmentID
= 17;" db-types="SQLServer" />
<sql-case id="delete_hive_basic" value="DELETE FROM orders"
db-types="Hive" />
<sql-case id="delete_with_where" value="DELETE FROM orders WHERE order_id
= 9527;" db-types="Hive" />
+ <sql-case id="delete_without_where_sql92" value="DELETE FROM t_order"
db-types="SQL92" />
</sql-cases>
diff --git
a/test/it/parser/src/main/resources/sql/supported/dml/select-expression.xml
b/test/it/parser/src/main/resources/sql/supported/dml/select-expression.xml
index 3948c4e7e90..1c3a4778fff 100644
--- a/test/it/parser/src/main/resources/sql/supported/dml/select-expression.xml
+++ b/test/it/parser/src/main/resources/sql/supported/dml/select-expression.xml
@@ -51,6 +51,7 @@
<sql-case id="select_where_with_predicate_with_sounds_like" value="SELECT
* FROM t_order WHERE t_order.order_id SOUNDS LIKE '1%'"
db-types="MySQL,Presto,Doris" />
<sql-case id="select_where_with_predicate_with_like" value="SELECT * FROM
t_order WHERE t_order.order_id NOT LIKE '1%' ESCAPE '$'"
db-types="MySQL,Presto,Hive" />
<sql-case id="select_where_with_predicate_with_not_like" value="SELECT *
FROM t_order WHERE t_order.status NOT LIKE '1%'"
db-types="MySQL,PostgreSQL,openGauss,Hive" />
+ <sql-case id="select_where_with_predicate_with_not_like_sql92"
value="SELECT * FROM t_order WHERE t_order.status NOT LIKE '1%'"
db-types="SQL92" />
<sql-case id="select_where_with_predicate_with_regexp" value="SELECT *
FROM t_order WHERE t_order.order_id NOT REGEXP '[123]'"
db-types="MySQL,Presto,Hive" />
<sql-case id="select_where_with_predicate_with_rlike" value="SELECT * FROM
t_order WHERE t_order.order_id NOT RLIKE '[123]'"
db-types="MySQL,Presto,Doris,Hive" />
<sql-case id="select_where_with_bit_expr_with_vertical_bar" value="SELECT
* FROM t_order WHERE t_order.order_id | ?" db-types="MySQL" />
diff --git
a/test/it/parser/src/main/resources/sql/supported/dml/select-join.xml
b/test/it/parser/src/main/resources/sql/supported/dml/select-join.xml
index bc1abe16830..a50afd79fb4 100644
--- a/test/it/parser/src/main/resources/sql/supported/dml/select-join.xml
+++ b/test/it/parser/src/main/resources/sql/supported/dml/select-join.xml
@@ -20,8 +20,11 @@
<sql-case id="select_inner_join_related_with_alias" value="SELECT i.* FROM
t_order o INNER JOIN t_order_item i ON o.order_id = i.order_id WHERE o.order_id
= ?" />
<sql-case id="select_inner_join_related_with_name" value="SELECT
t_order_item.* FROM t_order JOIN t_order_item ON t_order.order_id =
t_order_item.order_id WHERE t_order.order_id = ?" />
<sql-case id="select_join_using" value="SELECT i.* FROM t_order o JOIN
t_order_item i USING(order_id) WHERE o.order_id = ?"
db-types="MySQL,PostgreSQL,openGauss,Doris,Firebird" />
+ <sql-case id="select_join_using_sql92" value="SELECT i.* FROM t_order o
JOIN t_order_item i USING(order_id) WHERE o.order_id = ?" db-types="SQL92" />
<sql-case id="select_left_outer_join_related_with_alias" value="SELECT
d.department_id, e.last_name FROM departments d LEFT OUTER JOIN employees e ON
d.department_id = e.department_id ORDER BY d.department_id, e.last_name"
db-types="MySQL, Oracle" />
+ <sql-case id="select_left_outer_join_related_with_alias_sql92"
value="SELECT d.department_id, e.last_name FROM departments d LEFT OUTER JOIN
employees e ON d.department_id = e.department_id ORDER BY d.department_id,
e.last_name" db-types="SQL92" />
<sql-case id="select_right_outer_join_related_with_alias" value="SELECT
d.department_id, e.last_name FROM departments d RIGHT OUTER JOIN employees e ON
d.department_id = e.department_id ORDER BY d.department_id, e.last_name"
db-types="MySQL, Oracle" />
+ <sql-case id="select_right_outer_join_related_with_alias_sql92"
value="SELECT d.department_id, e.last_name FROM departments d RIGHT OUTER JOIN
employees e ON d.department_id = e.department_id ORDER BY d.department_id,
e.last_name" db-types="SQL92" />
<sql-case id="select_full_outer_join_related_with_alias" value="SELECT
d.department_id AS d_dept_id, e.department_id AS e_dept_id, e.last_name FROM
departments d FULL OUTER JOIN employees e ON d.department_id = e.department_id
ORDER BY d.department_id, e.last_name" db-types="Oracle" />
<sql-case id="select_full_outer_join_using_related_with_alias"
value="SELECT department_id AS d_e_dept_id, e.last_name FROM departments d FULL
OUTER JOIN employees e USING (department_id) ORDER BY department_id,
e.last_name" db-types="Oracle" />
<sql-case id="select_cross_apply_join_related_with_alias" value="SELECT
d.department_name, v.employee_id, v.last_name FROM departments d CROSS APPLY
(SELECT * FROM employees e WHERE e.department_id = d.department_id) v WHERE
d.department_name IN ('Marketing', 'Operations', 'Public Relations') ORDER BY
d.department_name, v.employee_id" db-types="Oracle" />
diff --git
a/test/it/parser/src/main/resources/sql/supported/dml/select-order-by.xml
b/test/it/parser/src/main/resources/sql/supported/dml/select-order-by.xml
index 0a2349e328c..48b94fc4d9e 100644
--- a/test/it/parser/src/main/resources/sql/supported/dml/select-order-by.xml
+++ b/test/it/parser/src/main/resources/sql/supported/dml/select-order-by.xml
@@ -18,6 +18,7 @@
<sql-cases>
<sql-case id="select_order_by_asc_and_index_desc" value="SELECT * FROM
t_order o ORDER BY o.order_id, 2 DESC" db-types="Doris,Firebird" />
+ <sql-case id="select_order_by_asc_and_index_desc_sql92" value="SELECT *
FROM t_order o ORDER BY o.order_id, 2 DESC" db-types="SQL92" />
<sql-case id="select_order_by_desc_and_index_asc" value="SELECT i.* FROM
t_order o, t_order_item i WHERE o.order_id = i.order_id AND o.status = 'init'
ORDER BY o.order_id DESC, 1" />
<sql-case id="select_order_by_with_ordered_column" value="SELECT
o.order_id AS gen_order_id_ FROM t_order o ORDER BY o.order_id" />
<sql-case id="select_order_by_with_date" value="SELECT i.* FROM t_order o,
t_order_item i WHERE o.order_id = i.order_id AND o.status = 'init' ORDER BY
i.creation_date DESC, o.order_id DESC, i.item_id" />
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 9a1ecdd6497..29e673be5d4 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
@@ -423,4 +423,11 @@
<sql-case id="select_union_firebird" value="SELECT 1 UNION SELECT 2"
db-types="Firebird"/>
<sql-case id="select_subquery_table_firebird" value="SELECT * FROM (SELECT
1) sub" db-types="Firebird"/>
<sql-case id="select_subquery_with_with_firebird" value="SELECT * FROM
(WITH t AS (SELECT 1) SELECT * FROM t) sub" db-types="Firebird"/>
+ <sql-case id="select_not_expression_sql92" value="SELECT NOT (1=1) FROM
t_order" db-types="SQL92" />
+ <sql-case id="select_where_is_true_sql92" value="SELECT * FROM t_order
WHERE active IS TRUE" db-types="SQL92" />
+ <sql-case id="select_where_is_false_sql92" value="SELECT * FROM t_order
WHERE active IS FALSE" db-types="SQL92" />
+ <sql-case id="select_distinct_simple_sql92" value="SELECT DISTINCT user_id
FROM t_order" db-types="SQL92" />
+ <sql-case id="select_distinct_with_count_sql92" value="SELECT
COUNT(DISTINCT order_id) c FROM t_order WHERE order_id < 1100"
db-types="SQL92" />
+ <sql-case id="select_having_sql92" value="SELECT user_id, COUNT(*) AS cnt
FROM t_order GROUP BY user_id HAVING COUNT(*) > 1" db-types="SQL92" />
+ <sql-case id="select_cast_int_sql92" value="SELECT CAST(user_id AS INT)
FROM t_order" db-types="SQL92" />
</sql-cases>
diff --git a/test/it/parser/src/main/resources/sql/supported/dml/update.xml
b/test/it/parser/src/main/resources/sql/supported/dml/update.xml
index d876c7d6ca6..4a63da44fcd 100644
--- a/test/it/parser/src/main/resources/sql/supported/dml/update.xml
+++ b/test/it/parser/src/main/resources/sql/supported/dml/update.xml
@@ -22,6 +22,7 @@
<sql-case id="update_with_unicode_escape_alias" value="UPDATE t_order AS u
SET status = ? WHERE u.order_id = ? AND u.user_id = ?"
db-types="PostgreSQL,openGauss" />
<sql-case id="update_equal_with_geography" value="UPDATE t_order SET
start_time = ?, status = 0, start_point =
ST_GeographyFromText('SRID=4326;POINT('||?||' '||?||')'), rule = ?::jsonb,
discount_type = ?, order_type = ? WHERE user_id = ? AND order_id = ?"
db-types="PostgreSQL,openGauss" />
<sql-case id="update_without_condition" value="UPDATE t_order o SET
o.status = 'finished'" db-types="MySQL,H2,Doris" />
+ <sql-case id="update_without_condition_sql92" value="UPDATE t_order o SET
o.status = 'finished'" db-types="SQL92" />
<sql-case id="update_with_extra_keywords" value="UPDATE LOW_PRIORITY
IGNORE t_order SET status = ? WHERE order_id = ? AND user_id = ?"
db-types="MySQL,Doris" />
<sql-case id="update_with_special_character" value="UPDATE `t_order` SET
`status` = ? WHERE `order_id` = ? AND user_id = ?" db-types="MySQL,Doris" />
<sql-case id="update_without_parameters" value="UPDATE t_order SET status
= 'update' WHERE order_id = 1000 AND user_id = 10" />