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 4f43701c005 Remove useless actual-logic_db-init.sql (#36769)
4f43701c005 is described below

commit 4f43701c00564ca52a1e1fe99708df64951da8e6
Author: Liang Zhang <[email protected]>
AuthorDate: Wed Oct 1 10:52:51 2025 +0800

    Remove useless actual-logic_db-init.sql (#36769)
---
 .../type/scenario/path/ScenarioDataPath.java       | 13 +++++-----
 .../actual/init-sql/mysql/actual-logic_db-init.sql | 28 ----------------------
 .../init-sql/opengauss/actual-logic_db-init.sql    | 28 ----------------------
 .../init-sql/postgresql/actual-logic_db-init.sql   | 28 ----------------------
 4 files changed, 6 insertions(+), 91 deletions(-)

diff --git 
a/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/runtime/type/scenario/path/ScenarioDataPath.java
 
b/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/runtime/type/scenario/path/ScenarioDataPath.java
index eda6346b1be..61e089b0f66 100644
--- 
a/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/runtime/type/scenario/path/ScenarioDataPath.java
+++ 
b/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/runtime/type/scenario/path/ScenarioDataPath.java
@@ -80,13 +80,7 @@ public final class ScenarioDataPath {
     }
     
     private boolean isTargetDatabaseInitSQLFileExisted(final String 
databaseName, final DatabaseType databaseType) {
-        String initSQLResourceFile = 
getTargetDatabaseInitSQLResourceFile(databaseName, databaseType);
-        return null != 
Thread.currentThread().getContextClassLoader().getResource(initSQLResourceFile);
-    }
-    
-    private String getTargetDatabaseInitSQLResourceFile(final String 
databaseName, final DatabaseType databaseType) {
-        String initSQLFileName = String.join("-", 
Type.TARGETS.name().toLowerCase(), databaseName, BASIC_INIT_SQL_FILE);
-        return String.join("/", getInitSQLResourcePath(databaseType), 
initSQLFileName);
+        return null != 
Thread.currentThread().getContextClassLoader().getResource(getTargetDatabaseInitSQLResourceFile(databaseName,
 databaseType));
     }
     
     private String getTargetDatabaseInitSQLFile(final String databaseName, 
final DatabaseType databaseType) {
@@ -96,6 +90,11 @@ public final class ScenarioDataPath {
         return url.getFile();
     }
     
+    private String getTargetDatabaseInitSQLResourceFile(final String 
databaseName, final DatabaseType databaseType) {
+        String initSQLFileName = String.join("-", 
Type.TARGETS.name().toLowerCase(), databaseName, BASIC_INIT_SQL_FILE);
+        return String.join("/", getInitSQLResourcePath(databaseType), 
initSQLFileName);
+    }
+    
     /**
      * Get init SQL resource path.
      *
diff --git 
a/test/e2e/sql/src/test/resources/env/scenario/db_tbl_sql_federation/data/actual/init-sql/mysql/actual-logic_db-init.sql
 
b/test/e2e/sql/src/test/resources/env/scenario/db_tbl_sql_federation/data/actual/init-sql/mysql/actual-logic_db-init.sql
deleted file mode 100644
index 4c829182ad6..00000000000
--- 
a/test/e2e/sql/src/test/resources/env/scenario/db_tbl_sql_federation/data/actual/init-sql/mysql/actual-logic_db-init.sql
+++ /dev/null
@@ -1,28 +0,0 @@
---
--- 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.
---
-
--- TODO open this comment when refresh metadata support view without push down 
execute
--- DROP VIEW IF EXISTS t_order_item_join_view;
--- DROP VIEW IF EXISTS t_order_subquery_view;
--- DROP VIEW IF EXISTS t_order_aggregation_view;
--- DROP VIEW IF EXISTS t_order_union_view;
-
--- CREATE VIEW t_order_item_join_view AS SELECT o.order_id, o.user_id, 
i.item_id FROM t_order o INNER JOIN t_order_item i ON o.order_id = i.order_id 
ORDER BY o.order_id, i.item_id;
--- CREATE VIEW t_order_subquery_view AS SELECT * FROM t_order o WHERE 
o.order_id IN (SELECT i.order_id FROM t_order_item i INNER JOIN t_product p ON 
i.product_id = p.product_id WHERE p.product_id = 10);
--- CREATE VIEW t_order_aggregation_view AS SELECT MAX(p.price) AS max_price, 
MIN(p.price) AS min_price, SUM(p.price) AS sum_price, AVG(p.price) AS 
avg_price, COUNT(1) AS count FROM t_order o INNER JOIN t_order_item i ON 
o.order_id = i.order_id INNER JOIN t_product p ON i.product_id = p.product_id 
GROUP BY o.order_id HAVING SUM(p.price) > 10000 ORDER BY max_price;
--- CREATE VIEW t_order_union_view AS SELECT * FROM t_order WHERE order_id > 
2000 UNION SELECT * FROM t_order WHERE order_id > 1500;
-DELETE FROM t_order WHERE order_id = 99999999;
diff --git 
a/test/e2e/sql/src/test/resources/env/scenario/db_tbl_sql_federation/data/actual/init-sql/opengauss/actual-logic_db-init.sql
 
b/test/e2e/sql/src/test/resources/env/scenario/db_tbl_sql_federation/data/actual/init-sql/opengauss/actual-logic_db-init.sql
deleted file mode 100644
index 4c829182ad6..00000000000
--- 
a/test/e2e/sql/src/test/resources/env/scenario/db_tbl_sql_federation/data/actual/init-sql/opengauss/actual-logic_db-init.sql
+++ /dev/null
@@ -1,28 +0,0 @@
---
--- 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.
---
-
--- TODO open this comment when refresh metadata support view without push down 
execute
--- DROP VIEW IF EXISTS t_order_item_join_view;
--- DROP VIEW IF EXISTS t_order_subquery_view;
--- DROP VIEW IF EXISTS t_order_aggregation_view;
--- DROP VIEW IF EXISTS t_order_union_view;
-
--- CREATE VIEW t_order_item_join_view AS SELECT o.order_id, o.user_id, 
i.item_id FROM t_order o INNER JOIN t_order_item i ON o.order_id = i.order_id 
ORDER BY o.order_id, i.item_id;
--- CREATE VIEW t_order_subquery_view AS SELECT * FROM t_order o WHERE 
o.order_id IN (SELECT i.order_id FROM t_order_item i INNER JOIN t_product p ON 
i.product_id = p.product_id WHERE p.product_id = 10);
--- CREATE VIEW t_order_aggregation_view AS SELECT MAX(p.price) AS max_price, 
MIN(p.price) AS min_price, SUM(p.price) AS sum_price, AVG(p.price) AS 
avg_price, COUNT(1) AS count FROM t_order o INNER JOIN t_order_item i ON 
o.order_id = i.order_id INNER JOIN t_product p ON i.product_id = p.product_id 
GROUP BY o.order_id HAVING SUM(p.price) > 10000 ORDER BY max_price;
--- CREATE VIEW t_order_union_view AS SELECT * FROM t_order WHERE order_id > 
2000 UNION SELECT * FROM t_order WHERE order_id > 1500;
-DELETE FROM t_order WHERE order_id = 99999999;
diff --git 
a/test/e2e/sql/src/test/resources/env/scenario/db_tbl_sql_federation/data/actual/init-sql/postgresql/actual-logic_db-init.sql
 
b/test/e2e/sql/src/test/resources/env/scenario/db_tbl_sql_federation/data/actual/init-sql/postgresql/actual-logic_db-init.sql
deleted file mode 100644
index 4c829182ad6..00000000000
--- 
a/test/e2e/sql/src/test/resources/env/scenario/db_tbl_sql_federation/data/actual/init-sql/postgresql/actual-logic_db-init.sql
+++ /dev/null
@@ -1,28 +0,0 @@
---
--- 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.
---
-
--- TODO open this comment when refresh metadata support view without push down 
execute
--- DROP VIEW IF EXISTS t_order_item_join_view;
--- DROP VIEW IF EXISTS t_order_subquery_view;
--- DROP VIEW IF EXISTS t_order_aggregation_view;
--- DROP VIEW IF EXISTS t_order_union_view;
-
--- CREATE VIEW t_order_item_join_view AS SELECT o.order_id, o.user_id, 
i.item_id FROM t_order o INNER JOIN t_order_item i ON o.order_id = i.order_id 
ORDER BY o.order_id, i.item_id;
--- CREATE VIEW t_order_subquery_view AS SELECT * FROM t_order o WHERE 
o.order_id IN (SELECT i.order_id FROM t_order_item i INNER JOIN t_product p ON 
i.product_id = p.product_id WHERE p.product_id = 10);
--- CREATE VIEW t_order_aggregation_view AS SELECT MAX(p.price) AS max_price, 
MIN(p.price) AS min_price, SUM(p.price) AS sum_price, AVG(p.price) AS 
avg_price, COUNT(1) AS count FROM t_order o INNER JOIN t_order_item i ON 
o.order_id = i.order_id INNER JOIN t_product p ON i.product_id = p.product_id 
GROUP BY o.order_id HAVING SUM(p.price) > 10000 ORDER BY max_price;
--- CREATE VIEW t_order_union_view AS SELECT * FROM t_order WHERE order_id > 
2000 UNION SELECT * FROM t_order WHERE order_id > 1500;
-DELETE FROM t_order WHERE order_id = 99999999;

Reply via email to