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 1b8435713e7 Add more test cases on Doris SQL parser (#37681)
1b8435713e7 is described below

commit 1b8435713e7a0e8baa0632912489e1d9dd1764ae
Author: Liang Zhang <[email protected]>
AuthorDate: Thu Jan 8 12:52:35 2026 +0800

    Add more test cases on Doris SQL parser (#37681)
---
 .../segment/dml/item/ColumnProjectionSegment.java  |  6 ++--
 .../it/parser/src/main/resources/case/dal/kill.xml |  2 ++
 test/it/parser/src/main/resources/case/dal/set.xml | 10 +++++++
 .../src/main/resources/case/dcl/create-user.xml    |  4 +++
 .../src/main/resources/case/ddl/alter-table.xml    | 22 ++++++++++++++
 .../src/main/resources/case/ddl/create-view.xml    | 15 ++++++++++
 .../it/parser/src/main/resources/case/dml/call.xml | 10 +++++++
 .../src/main/resources/case/dml/select-combine.xml | 30 +++++++++++++++++++
 .../resources/case/dml/select-special-function.xml | 20 +++++++++++++
 .../src/main/resources/case/dml/select-window.xml  | 34 ++++++++++++++++++++++
 .../parser/src/main/resources/case/dml/select.xml  | 29 ++++++++++++++++++
 .../src/main/resources/sql/supported/dal/kill.xml  |  2 ++
 .../src/main/resources/sql/supported/dal/set.xml   |  2 ++
 .../resources/sql/supported/dcl/create-user.xml    |  4 +++
 .../resources/sql/supported/ddl/alter-table.xml    |  2 ++
 .../resources/sql/supported/ddl/create-view.xml    |  1 +
 .../src/main/resources/sql/supported/dml/call.xml  |  1 +
 .../sql/supported/dml/select-special-function.xml  |  1 +
 .../resources/sql/supported/dml/select-window.xml  |  2 ++
 .../main/resources/sql/supported/dml/select.xml    |  4 +++
 20 files changed, 197 insertions(+), 4 deletions(-)

diff --git 
a/parser/sql/statement/core/src/main/java/org/apache/shardingsphere/sql/parser/statement/core/segment/dml/item/ColumnProjectionSegment.java
 
b/parser/sql/statement/core/src/main/java/org/apache/shardingsphere/sql/parser/statement/core/segment/dml/item/ColumnProjectionSegment.java
index e8a7c9076ed..b5bfe997a00 100644
--- 
a/parser/sql/statement/core/src/main/java/org/apache/shardingsphere/sql/parser/statement/core/segment/dml/item/ColumnProjectionSegment.java
+++ 
b/parser/sql/statement/core/src/main/java/org/apache/shardingsphere/sql/parser/statement/core/segment/dml/item/ColumnProjectionSegment.java
@@ -18,6 +18,7 @@
 package org.apache.shardingsphere.sql.parser.statement.core.segment.dml.item;
 
 import lombok.Getter;
+import lombok.RequiredArgsConstructor;
 import lombok.Setter;
 import 
org.apache.shardingsphere.sql.parser.statement.core.segment.dml.column.ColumnSegment;
 import 
org.apache.shardingsphere.sql.parser.statement.core.segment.generic.AliasAvailable;
@@ -29,6 +30,7 @@ import java.util.Optional;
 /**
  * Column projection segment.
  */
+@RequiredArgsConstructor
 @Setter
 @Getter
 public final class ColumnProjectionSegment implements ProjectionSegment, 
AliasAvailable {
@@ -39,10 +41,6 @@ public final class ColumnProjectionSegment implements 
ProjectionSegment, AliasAv
     
     private boolean visible = true;
     
-    public ColumnProjectionSegment(final ColumnSegment columnSegment) {
-        column = columnSegment;
-    }
-    
     @Override
     public String getColumnLabel() {
         return getAliasName().orElse(column.getIdentifier().getValue());
diff --git a/test/it/parser/src/main/resources/case/dal/kill.xml 
b/test/it/parser/src/main/resources/case/dal/kill.xml
index 8dbdfa69031..c7386e7b6bf 100644
--- a/test/it/parser/src/main/resources/case/dal/kill.xml
+++ b/test/it/parser/src/main/resources/case/dal/kill.xml
@@ -22,4 +22,6 @@
     <kill sql-case-id="kill_connection_with_numeric_id" process-id="16" />
     <kill sql-case-id="kill_query_with_numeric_id" process-id="16" />
     <kill sql-case-id="kill_with_numeric_id" process-id="16" />
+    <kill sql-case-id="kill_with_identifier_doris" process-id="job_session" />
+    <kill sql-case-id="kill_query_with_at_identifier_doris" 
process-id="@session_id" />
 </sql-parser-test-cases>
diff --git a/test/it/parser/src/main/resources/case/dal/set.xml 
b/test/it/parser/src/main/resources/case/dal/set.xml
index f955d30e79a..8988487a121 100644
--- a/test/it/parser/src/main/resources/case/dal/set.xml
+++ b/test/it/parser/src/main/resources/case/dal/set.xml
@@ -119,4 +119,14 @@
         </parameter-assign>
     </set-parameter>
     <set-parameter sql-case-id="set_session_authorization" />
+    <set-parameter sql-case-id="set_persist_system_variable_doris">
+        <parameter-assign value="200">
+            <parameter name="max_connections" scope="PERSIST" />
+        </parameter-assign>
+    </set-parameter>
+    <set-parameter sql-case-id="set_persist_only_system_variable_doris">
+        <parameter-assign value="'+08:00'">
+            <parameter name="time_zone" scope="PERSIST_ONLY" />
+        </parameter-assign>
+    </set-parameter>
 </sql-parser-test-cases>
diff --git a/test/it/parser/src/main/resources/case/dcl/create-user.xml 
b/test/it/parser/src/main/resources/case/dcl/create-user.xml
index 596598f51aa..12d93a3eece 100644
--- a/test/it/parser/src/main/resources/case/dcl/create-user.xml
+++ b/test/it/parser/src/main/resources/case/dcl/create-user.xml
@@ -63,4 +63,8 @@
     <create-user sql-case-id="create_azure_ad_user_without_login" />
     <create-user sql-case-id="create _user_with_option" />
     <create-user sql-case-id="create_user_with_user_auth_option" />
+    <create-user sql-case-id="create_user_require_ssl_doris" />
+    <create-user sql-case-id="create_user_require_none_doris" />
+    <create-user sql-case-id="create_user_require_x509_doris" />
+    <create-user sql-case-id="create_user_require_tls_specified_doris" />
 </sql-parser-test-cases>
diff --git a/test/it/parser/src/main/resources/case/ddl/alter-table.xml 
b/test/it/parser/src/main/resources/case/ddl/alter-table.xml
index 05cab343952..e0736f69331 100644
--- a/test/it/parser/src/main/resources/case/ddl/alter-table.xml
+++ b/test/it/parser/src/main/resources/case/ddl/alter-table.xml
@@ -2570,4 +2570,26 @@
             <new-partition name="partition2" start-index="54" stop-index="63" 
/>
         </rename-partition>
     </alter-table>
+
+    <alter-table sql-case-id="alter_table_add_column_first_doris">
+        <table name="t_order" start-index="12" stop-index="18" />
+        <add-column>
+            <column-definition type="INT" start-index="24" stop-index="34">
+                <column name="column9" start-index="24" stop-index="30" />
+            </column-definition>
+            <column-position start-index="36" stop-index="40" />
+        </add-column>
+    </alter-table>
+
+    <alter-table sql-case-id="alter_table_add_column_after_doris">
+        <table name="t_order" start-index="12" stop-index="18" />
+        <add-column>
+            <column-definition type="INT" start-index="24" stop-index="35">
+                <column name="column10" start-index="24" stop-index="31" />
+            </column-definition>
+            <column-position start-index="37" stop-index="50">
+                <column name="order_id" start-index="43" stop-index="50" />
+            </column-position>
+        </add-column>
+    </alter-table>
 </sql-parser-test-cases>
diff --git a/test/it/parser/src/main/resources/case/ddl/create-view.xml 
b/test/it/parser/src/main/resources/case/ddl/create-view.xml
index c6bee611eb3..aa8e02bfcdc 100644
--- a/test/it/parser/src/main/resources/case/ddl/create-view.xml
+++ b/test/it/parser/src/main/resources/case/ddl/create-view.xml
@@ -95,6 +95,21 @@
         </select>
     </create-view>
 
+    <create-view sql-case-id="create_view_with_owner_doris" 
view-definition="SELECT order_id, user_id FROM t_order">
+        <view name="v_sales" start-index="12" stop-index="25">
+            <owner name="report" start-index="12" stop-index="17" />
+        </view>
+        <select>
+            <projections start-index="37" stop-index="53">
+                <column-projection name="order_id" start-index="37" 
stop-index="44" />
+                <column-projection name="user_id" start-index="47" 
stop-index="53" />
+            </projections>
+            <from>
+                <simple-table name="t_order" start-index="60" stop-index="66" 
/>
+            </from>
+        </select>
+    </create-view>
+
     <create-view sql-case-id="create_view_with_columns_doris" 
view-definition="SELECT k1, k2 FROM example_table">
         <view name="example_view" start-index="12" stop-index="23">
             <column name="c1" start-index="26" stop-index="27" />
diff --git a/test/it/parser/src/main/resources/case/dml/call.xml 
b/test/it/parser/src/main/resources/case/dml/call.xml
index 0b7a46a1bbb..0895c29ba45 100644
--- a/test/it/parser/src/main/resources/case/dml/call.xml
+++ b/test/it/parser/src/main/resources/case/dml/call.xml
@@ -153,4 +153,14 @@
             <literal-expression value="member2@localhost" start-index="45" 
stop-index="63"/>
         </procedure-parameter>
     </call>
+    
+    <call sql-case-id="call_with_owner_doris">
+        <procedure-name name="analytics.proc_demo" start-index="5" 
stop-index="23"/>
+        <procedure-parameter>
+            <parameter-marker-expression parameter-index="0" start-index="25" 
stop-index="25"/>
+        </procedure-parameter>
+        <procedure-parameter>
+            <parameter-marker-expression parameter-index="1" start-index="28" 
stop-index="28"/>
+        </procedure-parameter>
+    </call>
 </sql-parser-test-cases>
diff --git a/test/it/parser/src/main/resources/case/dml/select-combine.xml 
b/test/it/parser/src/main/resources/case/dml/select-combine.xml
index ae54b59f083..e1a69aa9071 100644
--- a/test/it/parser/src/main/resources/case/dml/select-combine.xml
+++ b/test/it/parser/src/main/resources/case/dml/select-combine.xml
@@ -71,6 +71,36 @@
         </combine>
     </select>
 
+    <select sql-case-id="select_union_doris">
+        <projections start-index="7" stop-index="7">
+            <expression-projection text="1" start-index="7" stop-index="7">
+                <expr>
+                    <literal-expression value="1" start-index="7" 
stop-index="7" />
+                </expr>
+            </expression-projection>
+        </projections>
+        <combine combine-type="UNION" start-index="0" stop-index="22">
+            <left>
+                <projections start-index="7" stop-index="7">
+                    <expression-projection text="1" start-index="7" 
stop-index="7">
+                        <expr>
+                            <literal-expression value="1" start-index="7" 
stop-index="7" />
+                        </expr>
+                    </expression-projection>
+                </projections>
+            </left>
+            <right>
+                <projections start-index="22" stop-index="22">
+                    <expression-projection text="2" start-index="22" 
stop-index="22">
+                        <expr>
+                            <literal-expression value="2" start-index="22" 
stop-index="22" />
+                        </expr>
+                    </expression-projection>
+                </projections>
+            </right>
+        </combine>
+    </select>
+
     <select sql-case-id="select_union_all">
         <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/select-special-function.xml 
b/test/it/parser/src/main/resources/case/dml/select-special-function.xml
index 3e72c3ea55b..1cac313d6cb 100644
--- a/test/it/parser/src/main/resources/case/dml/select-special-function.xml
+++ b/test/it/parser/src/main/resources/case/dml/select-special-function.xml
@@ -4184,6 +4184,26 @@
         </from>
     </select>
 
+    <select sql-case-id="select_json_separator_doris">
+        <projections start-index="7" stop-index="37">
+            <expression-projection text="JSON_SEPARATOR(order_id, '$.a')" 
start-index="7" stop-index="37">
+                <expr>
+                    <function function-name="JSON_SEPARATOR" 
text="JSON_SEPARATOR(order_id, '$.a')" start-index="7" stop-index="37">
+                        <parameter>
+                            <column name="order_id" start-index="22" 
stop-index="29" />
+                        </parameter>
+                        <parameter>
+                            <literal-expression value="$.a" start-index="32" 
stop-index="36" />
+                        </parameter>
+                    </function>
+                </expr>
+            </expression-projection>
+        </projections>
+        <from>
+            <simple-table name="t_order" start-index="44" stop-index="50" />
+        </from>
+    </select>
+
     <select sql-case-id="select_json_type">
         <projections start-index="7" stop-index="26">
             <expression-projection start-index="7" stop-index="26" 
text="JSON_TYPE('[1,2,3]')">
diff --git a/test/it/parser/src/main/resources/case/dml/select-window.xml 
b/test/it/parser/src/main/resources/case/dml/select-window.xml
index ade7d269592..b0ece1e7401 100644
--- a/test/it/parser/src/main/resources/case/dml/select-window.xml
+++ b/test/it/parser/src/main/resources/case/dml/select-window.xml
@@ -93,6 +93,40 @@
         </from>
     </select>
 
+    <select sql-case-id="select_window_first_value_doris">
+        <projections start-index="7" stop-index="53">
+            <expression-projection text="FIRST_VALUE(v) OVER (PARTITION BY k 
ORDER BY v)" start-index="7" stop-index="53">
+                <expr>
+                    <function function-name="FIRST_VALUE" text="FIRST_VALUE(v) 
OVER (PARTITION BY k ORDER BY v)" start-index="7" stop-index="53">
+                        <parameter>
+                            <column name="v" start-index="19" stop-index="19" 
/>
+                        </parameter>
+                    </function>
+                </expr>
+            </expression-projection>
+        </projections>
+        <from>
+            <simple-table name="t_order" start-index="60" stop-index="66" />
+        </from>
+    </select>
+
+    <select sql-case-id="select_window_last_value_doris">
+        <projections start-index="7" stop-index="101">
+            <expression-projection text="LAST_VALUE(v) OVER (PARTITION BY k 
ORDER BY v ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)" start-index="7" 
stop-index="101">
+                <expr>
+                    <function function-name="LAST_VALUE" text="LAST_VALUE(v) 
OVER (PARTITION BY k ORDER BY v ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT 
ROW)" start-index="7" stop-index="101">
+                        <parameter>
+                            <column name="v" start-index="18" stop-index="18" 
/>
+                        </parameter>
+                    </function>
+                </expr>
+            </expression-projection>
+        </projections>
+        <from>
+            <simple-table name="t_order" start-index="108" stop-index="114" />
+        </from>
+    </select>
+
     <select sql-case-id="select_window_frame_doris">
         <projections start-index="7" stop-index="86">
             <aggregation-projection type="SUM" expression="SUM(v) OVER 
(PARTITION BY k ORDER BY v ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING)" 
start-index="7" stop-index="86">
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 a710b34292f..72492ec9345 100644
--- a/test/it/parser/src/main/resources/case/dml/select.xml
+++ b/test/it/parser/src/main/resources/case/dml/select.xml
@@ -11934,4 +11934,33 @@
             <simple-table name="DUAL" start-index="14" stop-index="17" />
         </from>
     </select>
+
+    <select sql-case-id="select_straight_join_doris">
+        <projections start-index="21" stop-index="21">
+            <shorthand-projection start-index="21" stop-index="21" />
+        </projections>
+        <from>
+            <simple-table name="t_order" start-index="28" stop-index="34" />
+        </from>
+    </select>
+
+    <select sql-case-id="select_for_update_doris">
+        <projections start-index="7" stop-index="7">
+            <shorthand-projection start-index="7" stop-index="7" />
+        </projections>
+        <from start-index="14" stop-index="20">
+            <simple-table name="t_order" start-index="14" stop-index="20" />
+        </from>
+        <lock start-index="22" stop-index="31" />
+    </select>
+
+    <select sql-case-id="select_function_with_owner_doris">
+        <projections start-index="7" stop-index="27">
+            <expression-projection text="analytics.custom_fn()" 
start-index="7" stop-index="27">
+                <expr>
+                    <function function-name="analytics.custom_fn()" 
text="analytics.custom_fn()" start-index="7" stop-index="27" />
+                </expr>
+            </expression-projection>
+        </projections>
+    </select>
 </sql-parser-test-cases>
diff --git a/test/it/parser/src/main/resources/sql/supported/dal/kill.xml 
b/test/it/parser/src/main/resources/sql/supported/dal/kill.xml
index eecf4c809dc..54605250e63 100644
--- a/test/it/parser/src/main/resources/sql/supported/dal/kill.xml
+++ b/test/it/parser/src/main/resources/sql/supported/dal/kill.xml
@@ -22,4 +22,6 @@
     <sql-case id="kill_connection_with_numeric_id" value="KILL CONNECTION 16" 
db-types="Doris" />
     <sql-case id="kill_query_with_numeric_id" value="KILL QUERY 16" 
db-types="Doris" />
     <sql-case id="kill_with_numeric_id" value="KILL 16" db-types="Doris" />
+    <sql-case id="kill_with_identifier_doris" value="KILL job_session" 
db-types="Doris" />
+    <sql-case id="kill_query_with_at_identifier_doris" value="KILL QUERY 
@session_id" db-types="Doris" />
 </sql-cases>
diff --git a/test/it/parser/src/main/resources/sql/supported/dal/set.xml 
b/test/it/parser/src/main/resources/sql/supported/dal/set.xml
index 8706ee8cc2e..94660d252fb 100644
--- a/test/it/parser/src/main/resources/sql/supported/dal/set.xml
+++ b/test/it/parser/src/main/resources/sql/supported/dal/set.xml
@@ -45,4 +45,6 @@
     <sql-case id="set_charset_postgresql" value="SET NAMES 'UTF8'" 
db-types="PostgreSQL" />
     <sql-case id="set_client_encoding" value="SET CLIENT_ENCODING TO 'UTF8'" 
db-types="PostgreSQL" />
     <sql-case id="set_session_authorization" value="SET SESSION AUTHORIZATION 
user1 PASSWORD 'password'" db-types="openGauss" />
+    <sql-case id="set_persist_system_variable_doris" value="SET PERSIST 
max_connections = 200" db-types="Doris" />
+    <sql-case id="set_persist_only_system_variable_doris" value="SET 
PERSIST_ONLY time_zone = '+08:00'" db-types="Doris" />
 </sql-cases>
diff --git 
a/test/it/parser/src/main/resources/sql/supported/dcl/create-user.xml 
b/test/it/parser/src/main/resources/sql/supported/dcl/create-user.xml
index cde675ae6fc..9b8ca5885fe 100644
--- a/test/it/parser/src/main/resources/sql/supported/dcl/create-user.xml
+++ b/test/it/parser/src/main/resources/sql/supported/dcl/create-user.xml
@@ -35,6 +35,10 @@
     <sql-case id="create_user_with_password_options" value="CREATE USER user1 
DEFAULT ROLE role1 PASSWORD EXPIRE DEFAULT PASSWORD HISTORY DEFAULT" 
db-types="MySQL,Doris" />
     <sql-case id="create_user_with_lock_option" value="CREATE USER user1 
DEFAULT ROLE role1 ACCOUNT LOCK" db-types="MySQL,Doris" />
     <sql-case id="create_user_with_options" value="CREATE USER user1 DEFAULT 
ROLE role1 WITH MAX_QUERIES_PER_HOUR 1 MAX_UPDATES_PER_HOUR 1 PASSWORD EXPIRE 
DEFAULT PASSWORD HISTORY DEFAULT ACCOUNT LOCK" db-types="MySQL,Doris" />
+    <sql-case id="create_user_require_ssl_doris" value="CREATE USER user_ssl 
REQUIRE SSL" db-types="Doris" />
+    <sql-case id="create_user_require_none_doris" value="CREATE USER 
user_no_tls REQUIRE NONE" db-types="Doris" />
+    <sql-case id="create_user_require_x509_doris" value="CREATE USER user_x509 
REQUIRE X509" db-types="Doris" />
+    <sql-case id="create_user_require_tls_specified_doris" value="CREATE USER 
user_tls REQUIRE SUBJECT 'subj' ISSUER 'issuer' CIPHER 'cipher_name'" 
db-types="Doris" />
     <sql-case id="create_external_user" value="CREATE USER user1 IDENTIFIED 
EXTERNALLY" db-types="Oracle" />
     <sql-case id="create_global_user" value="CREATE USER user1 IDENTIFIED 
GLOBALLY" db-types="Oracle" />
     <sql-case id="create_user_with_password" value="CREATE USER user1 
IDENTIFIED BY RANDOM password default role role1" db-types="H2,MySQL" />
diff --git 
a/test/it/parser/src/main/resources/sql/supported/ddl/alter-table.xml 
b/test/it/parser/src/main/resources/sql/supported/ddl/alter-table.xml
index dd7e851c9b6..0e667345175 100644
--- a/test/it/parser/src/main/resources/sql/supported/ddl/alter-table.xml
+++ b/test/it/parser/src/main/resources/sql/supported/ddl/alter-table.xml
@@ -84,6 +84,8 @@
     <sql-case id="alter_table_add_column_with_first" value="ALTER TABLE 
t_order ADD column3 VARCHAR(10) FIRST" db-types="MySQL" />
     <sql-case id="alter_table_add_column_with_after" value="ALTER TABLE 
t_order ADD column4 VARCHAR(10) AFTER order_id" db-types="MySQL" />
     <sql-case id="alter_table_add_column_with_first_after" value="ALTER TABLE 
t_order ADD column5 VARCHAR(10) FIRST, ADD column6 VARCHAR(10) FIRST, ADD 
column7 VARCHAR(10) AFTER column5, ADD column8 VARCHAR(10) AFTER column6" 
db-types="MySQL" />
+    <sql-case id="alter_table_add_column_first_doris" value="ALTER TABLE 
t_order ADD column9 INT FIRST" db-types="Doris" />
+    <sql-case id="alter_table_add_column_after_doris" value="ALTER TABLE 
t_order ADD column10 INT AFTER order_id" db-types="Doris" />
     <sql-case id="alter_table_modify_column" value="ALTER TABLE t_order MODIFY 
column4 VARCHAR(20)" db-types="MySQL,Oracle" />
     <sql-case id="alter_table_modify_columns" value="ALTER TABLE t_order 
MODIFY column4 VARCHAR(20), MODIFY column5 VARCHAR(20), MODIFY column6 
VARCHAR(20)" db-types="MySQL" />
     <sql-case id="alter_table_modify_column_with_first" value="ALTER TABLE 
t_order MODIFY status VARCHAR(20) FIRST" db-types="MySQL" />
diff --git 
a/test/it/parser/src/main/resources/sql/supported/ddl/create-view.xml 
b/test/it/parser/src/main/resources/sql/supported/ddl/create-view.xml
index 8ad1238ad3c..28780d3a873 100644
--- a/test/it/parser/src/main/resources/sql/supported/ddl/create-view.xml
+++ b/test/it/parser/src/main/resources/sql/supported/ddl/create-view.xml
@@ -21,6 +21,7 @@
     <sql-case id="create_view_with_udf_nested_fun" value="CREATE VIEW V_T1_C 
AS SELECT DB29023216.TESTFUNC(NOW())" db-types="MySQL" />
     <sql-case id="create_view_with_udf_arg" value="CREATE VIEW V_T1_C AS 
SELECT DB29023216.TESTFUNC(1,2,3,4)" db-types="MySQL" />
     <sql-case id="create_view" value="CREATE VIEW comedies AS SELECT * FROM 
films WHERE kind = 'Comedy'" 
db-types="MySQL,PostgreSQL,openGauss,SQLServer,Doris" />
+    <sql-case id="create_view_with_owner_doris" value="CREATE VIEW 
report.v_sales AS SELECT order_id, user_id FROM t_order" db-types="Doris" />
     <sql-case id="create_view_with_columns_doris" value="CREATE VIEW 
example_view (c1, c2) AS SELECT k1, k2 FROM example_table" db-types="Doris" />
     <sql-case id="create_view_with_check_option" value="CREATE VIEW 
universal_comedies AS SELECT * FROM comedies WHERE classification = 'U' WITH 
LOCAL CHECK OPTION" db-types="PostgreSQL,openGauss" />
     <sql-case id="create_view_with_recursive" value="CREATE RECURSIVE VIEW 
public.nums_1_100 (n) AS VALUES (1) UNION ALL SELECT n+1 FROM nums_1_100 WHERE 
n = 100" db-types="PostgreSQL,openGauss" />
diff --git a/test/it/parser/src/main/resources/sql/supported/dml/call.xml 
b/test/it/parser/src/main/resources/sql/supported/dml/call.xml
index 06f3a04b065..a57efa069b4 100644
--- a/test/it/parser/src/main/resources/sql/supported/dml/call.xml
+++ b/test/it/parser/src/main/resources/sql/supported/dml/call.xml
@@ -22,6 +22,7 @@
     <sql-case id="call_with_parameters_all_placeholder" value="CALL p(?, ?) " 
db-types="MySQL,Doris" />
     <sql-case id="call_with_parameters_all_expression" value="CALL p('user', 
'order')" db-types="MySQL,Doris" />
     <sql-case id="call_with_parameters_mix" value="CALL p(@order_id, 'user', 
?)" db-types="MySQL,Doris" />
+    <sql-case id="call_with_owner_doris" value="CALL analytics.proc_demo(?, 
?)" db-types="Doris" />
     <sql-case id="call_with_named_notation_with_null" value="CALL p(a =&gt; 
null, b =&gt; 8, c =&gt; 2);" db-types="PostgreSQL" />
     <sql-case id="call_with_named_notation" value="CALL p(b =&gt; 8, c =&gt; 
2, a =&gt; 0);" db-types="PostgreSQL" />
     <sql-case id="call_with_mixed_notation" value="CALL p(null, 7, c =&gt; 
2);" db-types="PostgreSQL" />
diff --git 
a/test/it/parser/src/main/resources/sql/supported/dml/select-special-function.xml
 
b/test/it/parser/src/main/resources/sql/supported/dml/select-special-function.xml
index 4cd7fe31227..404a4d5da1b 100644
--- 
a/test/it/parser/src/main/resources/sql/supported/dml/select-special-function.xml
+++ 
b/test/it/parser/src/main/resources/sql/supported/dml/select-special-function.xml
@@ -165,6 +165,7 @@
     <sql-case id="select_json_parse" value="SELECT 
JSON_PARSE('{&quot;k1&quot;:&quot;v31&quot;,&quot;k2&quot;:300}')" 
db-types="Doris" />
     <sql-case id="select_json_parse_error_to_null" value="SELECT 
JSON_PARSE('invalid json')" db-types="Doris" />
     <sql-case id="select_json_parse_error_to_value" value="SELECT 
JSON_PARSE('invalid json', '{}')" db-types="Doris" />
+    <sql-case id="select_json_separator_doris" value="SELECT 
JSON_SEPARATOR(order_id, '$.a') FROM t_order" db-types="Doris" />
     <sql-case id="select_std" value="SELECT STD(1)" db-types="MySQL" />
     <sql-case id="select_stddev" value="SELECT STDDEV(1)" db-types="MySQL" />
     <sql-case id="select_stddev_pop" value="SELECT STDDEV_POP(1)" 
db-types="MySQL" />
diff --git 
a/test/it/parser/src/main/resources/sql/supported/dml/select-window.xml 
b/test/it/parser/src/main/resources/sql/supported/dml/select-window.xml
index 42c346fcb44..ce264f5690c 100644
--- a/test/it/parser/src/main/resources/sql/supported/dml/select-window.xml
+++ b/test/it/parser/src/main/resources/sql/supported/dml/select-window.xml
@@ -20,5 +20,7 @@
     <sql-case id="select_window" value="SELECT user_id, ROW_NUMBER() OVER w AS 
'row_number', RANK() OVER w AS 'rank', DENSE_RANK() OVER w AS 'dense_rank' FROM 
t_order WHERE order_id = ? WINDOW w AS (ORDER BY user_id)" 
db-types="MySQL,Doris" />
     <sql-case id="select_window_partition_order_doris" value="SELECT 
ROW_NUMBER() OVER (PARTITION BY k ORDER BY v) FROM t_order" db-types="Doris" />
     <sql-case id="select_window_lead_lag_doris" value="SELECT LEAD(v) OVER 
(PARTITION BY k ORDER BY v) FROM t_order" db-types="Doris" />
+    <sql-case id="select_window_first_value_doris" value="SELECT 
FIRST_VALUE(v) OVER (PARTITION BY k ORDER BY v) FROM t_order" db-types="Doris" 
/>
+    <sql-case id="select_window_last_value_doris" value="SELECT LAST_VALUE(v) 
OVER (PARTITION BY k ORDER BY v ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT 
ROW) FROM t_order" db-types="Doris" />
     <sql-case id="select_window_frame_doris" value="SELECT SUM(v) OVER 
(PARTITION BY k ORDER BY v ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING) FROM 
t_order" db-types="Doris" />
 </sql-cases>
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 47405458386..c6b6ca78fdd 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
@@ -90,6 +90,10 @@
     <sql-case id="select_with_spatial_function" value="SELECT * FROM t_order 
WHERE ST_DISTANCE_SPHERE(POINT(113.358772, 23.1273723), 
POINT(user_id,order_id)) != 0" db-types="MySQL" />
     <sql-case id="select_current_user" value="SELECT CURRENT_USER" 
db-types="PostgreSQL,openGauss" />
     <sql-case id="select_with_match_against" value="SELECT * FROM t_order_item 
WHERE MATCH(t_order_item.description) AGAINST (? IN NATURAL LANGUAGE MODE) AND 
user_id = ?" db-types="MySQL,Doris" />
+    <sql-case id="select_straight_join_doris" value="SELECT STRAIGHT_JOIN * 
FROM t_order" db-types="Doris" />
+    <sql-case id="select_for_update_doris" value="SELECT * FROM t_order FOR 
UPDATE" db-types="Doris" />
+    <sql-case id="select_union_doris" value="SELECT 1 UNION SELECT 2" 
db-types="Doris" />
+    <sql-case id="select_function_with_owner_doris" value="SELECT 
analytics.custom_fn()" db-types="Doris" />
     <sql-case id="select_with_json_separator" value="select 
content_json->>'$.nation' as nation,content_json->>'$.title' as title from 
tb_content_json b where b.content_id=1" db-types="MySQL" />
     <sql-case id="select_with_json_value_return_type" value="SELECT * FROM 
t_order WHERE JSON_VALUE(items, '$.name' RETURNING VARCHAR(100)) = 'jack'" 
db-types="MySQL" />
     <sql-case id="select_with_convert_function1" value="SELECT 
CONVERT(SUBSTRING(content, 5) , SIGNED) AS signed_content FROM t_order WHERE 
order_id = 1" db-types="MySQL" />

Reply via email to