You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by du...@apache.org on 2023/04/10 00:34:04 UTC

[shardingsphere] branch master updated: test: add query test for og and pg in tbl mode. (#25021)

This is an automated email from the ASF dual-hosted git repository.

duanzhengqiang 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 e874093e16e test: add query test for og and pg in tbl mode. (#25021)
e874093e16e is described below

commit e874093e16e4a7779ef1b2bdc3b98297196289d8
Author: boyjoy1127 <10...@users.noreply.github.com>
AuthorDate: Mon Apr 10 08:33:57 2023 +0800

    test: add query test for og and pg in tbl mode. (#25021)
    
    Co-authored-by: boyjoy1127 <bo...@126.com>
---
 .../dql/dataset/tbl/select_sys_data_for_og.xml     | 32 ++++++++++++++++++++++
 .../dql/dataset/tbl/select_sys_data_for_pg.xml     | 31 +++++++++++++++++++++
 .../dql/dql-integration-select-expression.xml      |  4 +--
 3 files changed, 65 insertions(+), 2 deletions(-)

diff --git a/test/e2e/sql/src/test/resources/cases/dql/dataset/tbl/select_sys_data_for_og.xml b/test/e2e/sql/src/test/resources/cases/dql/dataset/tbl/select_sys_data_for_og.xml
new file mode 100644
index 00000000000..5cdba8e550c
--- /dev/null
+++ b/test/e2e/sql/src/test/resources/cases/dql/dataset/tbl/select_sys_data_for_og.xml
@@ -0,0 +1,32 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<dataset>
+    <metadata>
+        <column name="Schema" />
+        <column name="Name" />
+        <column name="Type" />
+        <column name="Owner" />
+        <column name="Storage" assertion="false" />
+    </metadata>
+    <row values="public | t_broadcast_table | table | mock user" />
+    <row values="public | t_order | table | mock user" />
+    <row values="public | t_order_federate_sharding | table | mock user" />
+    <row values="public | t_order_item | table | mock user" />
+    <row values="public | t_order_item_federate_sharding | table | mock user" />
+    <row values="public | t_single_table | table | mock user" />
+</dataset>
diff --git a/test/e2e/sql/src/test/resources/cases/dql/dataset/tbl/select_sys_data_for_pg.xml b/test/e2e/sql/src/test/resources/cases/dql/dataset/tbl/select_sys_data_for_pg.xml
new file mode 100644
index 00000000000..f88adeb27ae
--- /dev/null
+++ b/test/e2e/sql/src/test/resources/cases/dql/dataset/tbl/select_sys_data_for_pg.xml
@@ -0,0 +1,31 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<dataset>
+    <metadata>
+        <column name="Schema" />
+        <column name="Name" />
+        <column name="Type" />
+        <column name="Owner" />
+    </metadata>
+    <row values="public | t_broadcast_table | table | mock user" />
+    <row values="public | t_order | table | mock user" />
+    <row values="public | t_order_federate_sharding | table | mock user" />
+    <row values="public | t_order_item | table | mock user" />
+    <row values="public | t_order_item_federate_sharding | table | mock user" />
+    <row values="public | t_single_table | table | mock user" />
+</dataset>
diff --git a/test/e2e/sql/src/test/resources/cases/dql/dql-integration-select-expression.xml b/test/e2e/sql/src/test/resources/cases/dql/dql-integration-select-expression.xml
index 9be5c2972fc..fd532489b0a 100644
--- a/test/e2e/sql/src/test/resources/cases/dql/dql-integration-select-expression.xml
+++ b/test/e2e/sql/src/test/resources/cases/dql/dql-integration-select-expression.xml
@@ -110,11 +110,11 @@
         <assertion parameters="1000:long" expected-data-source-name="read_dataset" />
     </test-case>
     
-    <test-case sql="SELECT n.nspname as &quot;Schema&quot;, c.relname as &quot;Name&quot;, CASE c.relkind WHEN 'r' THEN 'table' WHEN 'v' THEN 'view' WHEN 'm' THEN 'materialized view' WHEN 'i' THEN 'index' WHEN 'S' THEN 'sequence' WHEN 's' THEN 'special' WHEN 'f' THEN 'foreign table' WHEN 'p' THEN 'partitioned table' WHEN 'I' THEN 'partitioned index' END as &quot;Type&quot;, pg_catalog.pg_get_userbyid(c.relowner) as &quot;Owner&quot; FROM pg_catalog.pg_class c LEFT JOIN pg_catalog.pg_name [...]
+    <test-case sql="SELECT n.nspname as &quot;Schema&quot;, c.relname as &quot;Name&quot;, CASE c.relkind WHEN 'r' THEN 'table' WHEN 'v' THEN 'view' WHEN 'm' THEN 'materialized view' WHEN 'i' THEN 'index' WHEN 'S' THEN 'sequence' WHEN 's' THEN 'special' WHEN 'f' THEN 'foreign table' WHEN 'p' THEN 'partitioned table' WHEN 'I' THEN 'partitioned index' END as &quot;Type&quot;, pg_catalog.pg_get_userbyid(c.relowner) as &quot;Owner&quot; FROM pg_catalog.pg_class c LEFT JOIN pg_catalog.pg_name [...]
         <assertion expected-data-file="select_sys_data_for_pg.xml" />
     </test-case>
     
-    <test-case sql="SELECT n.nspname as &quot;Schema&quot;, c.relname as &quot;Name&quot;, CASE c.relkind WHEN 'r' THEN 'table' WHEN 'v' THEN 'view' WHEN 'i' THEN 'index' WHEN 'I' THEN 'global partition index' WHEN 'S' THEN 'sequence' WHEN 'L' THEN 'large sequence' WHEN 'f' THEN 'foreign table' WHEN 'm' THEN 'materialized view'  WHEN 'e' THEN 'stream' WHEN 'o' THEN 'contview' END as &quot;Type&quot;, pg_catalog.pg_get_userbyid(c.relowner) as &quot;Owner&quot;, c.reloptions as &quot;Stora [...]
+    <test-case sql="SELECT n.nspname as &quot;Schema&quot;, c.relname as &quot;Name&quot;, CASE c.relkind WHEN 'r' THEN 'table' WHEN 'v' THEN 'view' WHEN 'i' THEN 'index' WHEN 'I' THEN 'global partition index' WHEN 'S' THEN 'sequence' WHEN 'L' THEN 'large sequence' WHEN 'f' THEN 'foreign table' WHEN 'm' THEN 'materialized view'  WHEN 'e' THEN 'stream' WHEN 'o' THEN 'contview' END as &quot;Type&quot;, pg_catalog.pg_get_userbyid(c.relowner) as &quot;Owner&quot;, c.reloptions as &quot;Stora [...]
         <assertion expected-data-file="select_sys_data_for_og.xml" />
     </test-case>
 </integration-test-cases>