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 4c731454907 Add SQL parser test cases for Doris (#37832)
4c731454907 is described below
commit 4c7314549074293521888ef30575008482733377
Author: Liang Zhang <[email protected]>
AuthorDate: Sun Jan 25 13:05:06 2026 +0800
Add SQL parser test cases for Doris (#37832)
* Add SQL parser test cases for Doris
* Add SQL parser test cases for Doris
---
test/it/parser/src/main/resources/case/dml/select.xml | 10 ++++++++++
test/it/parser/src/main/resources/sql/supported/dml/select.xml | 1 +
.../parser/src/main/resources/sql/unsupported/unsupported.xml | 1 +
3 files changed, 12 insertions(+)
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 34dcc0eeaed..deb0c36a4f0 100644
--- a/test/it/parser/src/main/resources/case/dml/select.xml
+++ b/test/it/parser/src/main/resources/case/dml/select.xml
@@ -12066,6 +12066,16 @@
</projections>
</select>
+ <select sql-case-id="select_bit_literal_upper_doris">
+ <projections start-index="7" stop-index="13">
+ <expression-projection text="B'1101'" start-index="7"
stop-index="13">
+ <expr>
+ <common-expression text="B'1101'" start-index="7"
stop-index="13" />
+ </expr>
+ </expression-projection>
+ </projections>
+ </select>
+
<select sql-case-id="select_true_literal_doris">
<projections start-index="7" stop-index="10">
<expression-projection text="true" start-index="7" stop-index="10">
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 110e746f4e8..17b5e7acd81 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
@@ -247,6 +247,7 @@
<sql-case id="select_date_literal_doris" value="SELECT DATE '2020-01-01'"
db-types="Doris" />
<sql-case id="select_hex_literal_doris" value="SELECT 0x1AF"
db-types="Doris" />
<sql-case id="select_bit_literal_doris" value="SELECT b'1010'"
db-types="Doris" />
+ <sql-case id="select_bit_literal_upper_doris" value="SELECT B'1101'"
db-types="Doris" />
<sql-case id="select_collate_clause_doris" value="SELECT 'a' COLLATE
utf8mb4_bin" db-types="Doris" />
<sql-case id="select_true_literal_doris" value="SELECT TRUE"
db-types="Doris,Hive" />
<sql-case id="select_false_literal_doris" value="SELECT FALSE"
db-types="Doris" />
diff --git a/test/it/parser/src/main/resources/sql/unsupported/unsupported.xml
b/test/it/parser/src/main/resources/sql/unsupported/unsupported.xml
index 4f13bf6f95a..3448549e8bf 100644
--- a/test/it/parser/src/main/resources/sql/unsupported/unsupported.xml
+++ b/test/it/parser/src/main/resources/sql/unsupported/unsupported.xml
@@ -26,6 +26,7 @@
<sql-case id="create_table_as_select" value="create table agg_data_2k as
select g from generate_series(0, 1999) g;" db-types="PostgreSQL" />
<sql-case id="create_temp_table" value="create temp table old_oids as
select relname, oid as oldoid, relfilenode as oldfilenode from pg_class where
relname like 'at_partitioned%'" db-types="PostgreSQL" />
<sql-case id="select_case_when" value="select relname,c.oid = oldoid as
orig_oid,case relfilenode when 0 then 'none' when c.oid then 'own' when
oldfilenode then 'orig' else 'OTHER' end as storage, obj_description(c.oid,
'pg_class') as desc from pg_class c left join old_oids using (relname) where
relname like 'at_partitioned%' order by relname" db-types="PostgreSQL" />
+ <sql-case id="unsupported_select_json_value_on_error_for_doris"
value="SELECT JSON_VALUE('{"price": "49.95"}', '$.price'
RETURNING DECIMAL(4,1) null on empty default 0 on error)" db-types="Doris" />
<sql-case id="select_like" value="select conname, obj_description(oid,
'pg_constraint') as desc from pg_constraint where conname like
'at_partitioned%' order by conname" db-types="PostgreSQL" />
<sql-case id="select_keyword" value="select relname,c.oid = oldoid as
orig_oid,case relfilenode when 0 then 'none' when c.oid then 'own' when
oldfilenode then 'orig' else 'OTHER' end as storage, obj_description(c.oid,
'pg_class') as desc from pg_class c left join old_oids using (relname) where
relname like 'at_partitioned%' order by relname" db-types="PostgreSQL" />
<sql-case id="unsupported_date_literal_for_clickhouse" value="SELECT DATE
'2024-01-01'" db-types="ClickHouse" />