Repository: yorklim/CS3213_Team_17
Pull request #92: Update to read from system properties
Author: login: yorklim
Created: 2025-03-29T15:46:32Z | Merged: 2025-03-30T06:59:25Z



Diff:
diff --git a/src/sqlancer/clickhouse/ClickHouseProvider.java b/src/sqlancer/clickhouse/ClickHouseProvider.java
index 895adbfc..ee8cfeac 100644
--- a/src/sqlancer/clickhouse/ClickHouseProvider.java
+++ b/src/sqlancer/clickhouse/ClickHouseProvider.java
@@ -57,22 +57,21 @@ public void generateDatabase(ClickHouseGlobalState globalState) throws Exception
         // Generate random queries (Insert, Update, Delete, etc.)
         ClickHouseTableQueryGenerator tableQueryGenerator = new ClickHouseTableQueryGenerator(globalState);
 
-        tableCreator.create();
-        tableQueryGenerator.generateNExecute();
-
-        // // For Future Custom Queries for Testing (Table Creation)
-        // if (true) {
-        // tableCreator.create();
-        // } else {
-        // tableCreator.runQueryFromFile("placeholder", globalState);
-        // }
-        //
-        // // For Future Custom Queries for Testing (Table Query Generation)
-        // if (true) {
-        // tableQueryGenerator.generateNExecute();
-        // } else {
-        // tableQueryGenerator.runQueryFromFile("placeholder", globalState);
-        // }
+        String staticTable = System.getProperty("staticTable");
+        // For Future Custom Queries for Testing (Table Creation)
+        if (staticTable == null || !staticTable.equals("true")) {
+            tableCreator.create();
+        } else {
+            tableCreator.runQueryFromFile("staticTable.sql", globalState);
+        }
+
+        String staticQuery = System.getProperty("staticQuery");
+        // For Future Custom Queries for Testing (Table Query Generation)
+        if (staticTable == null || !staticQuery.equals("true")) {
+            tableQueryGenerator.generateNExecute();
+        } else {
+            tableQueryGenerator.runQueryFromFile("staticQuery.sql", globalState);
+        }
     }
 
     @Override
diff --git a/src/sqlancer/cnosdb/CnosDBProvider.java b/src/sqlancer/cnosdb/CnosDBProvider.java
index fa3312d2..c90e2bde 100644
--- a/src/sqlancer/cnosdb/CnosDBProvider.java
+++ b/src/sqlancer/cnosdb/CnosDBProvider.java
@@ -36,22 +36,21 @@ public void generateDatabase(CnosDBGlobalState globalState) throws Exception {
         // Generate random queries (Insert, Update, Delete, etc.)
         CnosDBTableQueryGenerator tableQueryGenerator = new CnosDBTableQueryGenerator(globalState);
 
-        tableCreator.create();
-        tableQueryGenerator.generateNExecute();
-
-        // // For Future Custom Queries for Testing (Table Creation)
-        // if (true) {
-        // tableCreator.create();
-        // } else {
-        // tableCreator.runQueryFromFile("placeholder", globalState);
-        // }
-        //
-        // // For Future Custom Queries for Testing (Table Query Generation)
-        // if (true) {
-        // tableQueryGenerator.generateNExecute();
-        // } else {
-        // tableQueryGenerator.runQueryFromFile("placeholder", globalState);
-        // }
+        String staticTable = System.getProperty("staticTable");
+        // For Future Custom Queries for Testing (Table Creation)
+        if (staticTable == null || !staticTable.equals("true")) {
+            tableCreator.create();
+        } else {
+            tableCreator.runQueryFromFileCnos("staticTable.sql", globalState);
+        }
+
+        String staticQuery = System.getProperty("staticQuery");
+        // For Future Custom Queries for Testing (Table Query Generation)
+        if (staticTable == null || !staticQuery.equals("true")) {
+            tableQueryGenerator.generateNExecute();
+        } else {
+            tableQueryGenerator.runQueryFromFileCnos("staticQuery.sql", globalState);
+        }
     }
 
     @Override
diff --git a/src/sqlancer/cockroachdb/CockroachDBProvider.java b/src/sqlancer/cockroachdb/CockroachDBProvider.java
index 34918474..2390f8cd 100644
--- a/src/sqlancer/cockroachdb/CockroachDBProvider.java
+++ b/src/sqlancer/cockroachdb/CockroachDBProvider.java
@@ -71,21 +71,21 @@ public void generateDatabase(CockroachDBGlobalState globalState) throws Exceptio
         // Generate random queries (Insert, Update, Delete, etc.)
         CockroachDBTableQueryGenerator tableQueryGenerator = new CockroachDBTableQueryGenerator(globalState);
 
-        tableCreator.create();
-        tableQueryGenerator.generateNExecute();
-        // // For Future Custom Queries for Testing (Table Creation)
-        // if (true) {
-        // tableCreator.create();
-        // } else {
-        // tableCreator.runQueryFromFile("placeholder", globalState);
-        // }
-        //
-        // // For Future Custom Queries for Testing (Table Query Generation)
-        // if (true) {
-        // tableQueryGenerator.generateNExecute();
-        // } else {
-        // tableQueryGenerator.runQueryFromFile("placeholder", globalState);
-        // }
+        String staticTable = System.getProperty("staticTable");
+        // For Future Custom Queries for Testing (Table Creation)
+        if (staticTable == null || !staticTable.equals("true")) {
+            tableCreator.create();
+        } else {
+            tableCreator.runQueryFromFile("staticTable.sql", globalState);
+        }
+
+        String staticQuery = System.getProperty("staticQuery");
+        // For Future Custom Queries for Testing (Table Query Generation)
+        if (staticTable == null || !staticQuery.equals("true")) {
+            tableQueryGenerator.generateNExecute();
+        } else {
+            tableQueryGenerator.runQueryFromFile("staticQuery.sql", globalState);
+        }
 
         if (globalState.getDbmsSpecificOptions().getTestOracleFactory().stream()
                 .anyMatch(o -> o == CockroachDBOracleFactory.CERT)) {
diff --git a/src/sqlancer/common/FileExecuter.java b/src/sqlancer/common/FileExecuter.java
deleted file mode 100644
index b2c438ae..00000000
--- a/src/sqlancer/common/FileExecuter.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package sqlancer.common;
-
-import java.io.BufferedReader;
-import java.io.FileReader;
-
-import sqlancer.GlobalState;
-import sqlancer.SQLancerDBConnection;
-import sqlancer.common.query.Query;
-
-public abstract class FileExecuter {
-    public void runQueryFromFile(String file, GlobalState<?, ?, SQLancerDBConnection> globalState,
-            Class<? extends Query<SQLancerDBConnection>> queryType) {
-        try {
-            FileReader fr = new FileReader(file);
-            BufferedReader br = new BufferedReader(fr);
-            String cur = br.readLine();
-            while (cur != null) {
-                globalState.executeStatement(queryType.getDeclaredConstructor(String.class).newInstance(cur));
-                cur = br.readLine();
-            }
-            br.close();
-            fr.close();
-        } catch (Exception e) {
-        }
-    }
-}
diff --git a/src/sqlancer/common/FileExecutor.java b/src/sqlancer/common/FileExecutor.java
new file mode 100644
index 00000000..376f6ff5
--- /dev/null
+++ b/src/sqlancer/common/FileExecutor.java
@@ -0,0 +1,41 @@
+package sqlancer.common;
+
+import java.io.BufferedReader;
+import java.io.FileReader;
+
+import sqlancer.SQLGlobalState;
+import sqlancer.cnosdb.CnosDBGlobalState;
+import sqlancer.cnosdb.query.CnosDBOtherQuery;
+import sqlancer.common.query.SQLQueryAdapter;
+
+public abstract class FileExecutor {
+    public void runQueryFromFile(String file, SQLGlobalState<?, ?> globalState) {
+        try {
+            FileReader fr = new FileReader(file);
+            BufferedReader br = new BufferedReader(fr);
+            String cur = br.readLine();
+            while (cur != null) {
+                globalState.executeStatement(new SQLQueryAdapter(cur));
+                cur = br.readLine();
+            }
+            br.close();
+            fr.close();
+        } catch (Exception e) {
+        }
+    }
+
+    public void runQueryFromFileCnos(String file, CnosDBGlobalState globalState) {
+        try {
+            FileReader fr = new FileReader(file);
+            BufferedReader br = new BufferedReader(fr);
+            String cur = br.readLine();
+            while (cur != null) {
+                globalState.executeStatement(new CnosDBOtherQuery(cur, null));
+                cur = br.readLine();
+            }
+            br.close();
+            fr.close();
+        } catch (Exception e) {
+        }
+    }
+}
diff --git a/src/sqlancer/common/TableCreator.java b/src/sqlancer/common/TableCreator.java
index 7bd9279a..c43edd76 100644
--- a/src/sqlancer/common/TableCreator.java
+++ b/src/sqlancer/common/TableCreator.java
@@ -1,6 +1,6 @@
 package sqlancer.common;
 
-public abstract class TableCreator extends FileExecuter {
+public abstract class TableCreator extends FileExecutor {
 
     public abstract void create() throws Exception;
 }
diff --git a/src/sqlancer/common/TableQueryGenerator.java b/src/sqlancer/common/TableQueryGenerator.java
index 1af30ac1..b4da5759 100644
--- a/src/sqlancer/common/TableQueryGenerator.java
+++ b/src/sqlancer/common/TableQueryGenerator.java
@@ -2,7 +2,7 @@
 
 import sqlancer.GlobalState;
 
-public abstract class TableQueryGenerator extends FileExecuter {
+public abstract class TableQueryGenerator extends FileExecutor {
     protected int total;
     protected int[] nrActions;
     protected GlobalState<?, ?, ?> globalState;
diff --git a/src/sqlancer/databend/DatabendProvider.java b/src/sqlancer/databend/DatabendProvider.java
index ae4d90de..9049de5d 100644
--- a/src/sqlancer/databend/DatabendProvider.java
+++ b/src/sqlancer/databend/DatabendProvider.java
@@ -37,22 +37,21 @@ public void generateDatabase(DatabendGlobalState globalState) throws Exception {
         // Generate random queries (Insert, Update, Delete, etc.)
         DatabendTableQueryGenerator tableQueryGenerator = new DatabendTableQueryGenerator(globalState);
 
-        tableCreator.create();
-        tableQueryGenerator.generateNExecute();
+        String staticTable = System.getProperty("staticTable");
+        // For Future Custom Queries for Testing (Table Creation)
+        if (staticTable == null || !staticTable.equals("true")) {
+            tableCreator.create();
+        } else {
+            tableCreator.runQueryFromFile("staticTable.sql", globalState);
+        }
 
-        // // For Future Custom Queries for Testing (Table Creation)
-        // if (true) {
-        // tableCreator.create();
-        // } else {
-        // tableCreator.runQueryFromFile("placeholder", globalState);
-        // }
-        //
-        // // For Future Custom Queries for Testing (Table Query Generation)
-        // if (true) {
-        // tableQueryGenerator.generateNExecute();
-        // } else {
-        // tableQueryGenerator.runQueryFromFile("placeholder", globalState);
-        // }
+        String staticQuery = System.getProperty("staticQuery");
+        // For Future Custom Queries for Testing (Table Query Generation)
+        if (staticTable == null || !staticQuery.equals("true")) {
+            tableQueryGenerator.generateNExecute();
+        } else {
+            tableQueryGenerator.runQueryFromFile("staticQuery.sql", globalState);
+        }
     }
 
     @Override
diff --git a/src/sqlancer/doris/DorisProvider.java b/src/sqlancer/doris/DorisProvider.java
index 685a74c8..6b6ad637 100644
--- a/src/sqlancer/doris/DorisProvider.java
+++ b/src/sqlancer/doris/DorisProvider.java
@@ -35,21 +35,21 @@ public void generateDatabase(DorisGlobalState globalState) throws Exception {
         // Generate random queries (Insert, Update, Delete, etc.)
         DorisTableQueryGenerator tableQueryGenerator = new DorisTableQueryGenerator(globalState);
 
-        tableCreator.create();
-        tableQueryGenerator.generateNExecute();
-        // // For Future Custom Queries for Testing (Table Creation)
-        // if (true) {
-        // tableCreator.create();
-        // } else {
-        // tableCreator.runQueryFromFile("placeholder", globalState);
-        // }
-        //
-        // // For Future Custom Queries for Testing (Table Query Generation)
-        // if (true) {
-        // tableQueryGenerator.generateNExecute();
-        // } else {
-        // tableQueryGenerator.runQueryFromFile("placeholder", globalState);
-        // }
+        String staticTable = System.getProperty("staticTable");
+        // For Future Custom Queries for Testing (Table Creation)
+        if (staticTable == null || !staticTable.equals("true")) {
+            tableCreator.create();
+        } else {
+            tableCreator.runQueryFromFile("staticTable.sql", globalState);
+        }
+
+        String staticQuery = System.getProperty("staticQuery");
+        // For Future Custom Queries for Testing (Table Query Generation)
+        if (staticTable == null || !staticQuery.equals("true")) {
+            tableQueryGenerator.generateNExecute();
+        } else {
+            tableQueryGenerator.runQueryFromFile("staticQuery.sql", globalState);
+        }
     }
 
     @Override
diff --git a/src/sqlancer/duckdb/DuckDBProvider.java b/src/sqlancer/duckdb/DuckDBProvider.java
index 22c8cbf8..dca02436 100644
--- a/src/sqlancer/duckdb/DuckDBProvider.java
+++ b/src/sqlancer/duckdb/DuckDBProvider.java
@@ -37,22 +37,21 @@ public void generateDatabase(DuckDBGlobalState globalState) throws Exception {
         // Generate random queries (Insert, Update, Delete, etc.)
         DuckDBTableQueryGenerator tableQueryGenerator = new DuckDBTableQueryGenerator(globalState);
 
-        tableCreator.create();
-        tableQueryGenerator.generateNExecute();
-
-        // // For Future Custom Queries for Testing (Table Creation)
-        // if (true) {
-        // tableCreator.create();
-        // } else {
-        // tableCreator.runQueryFromFile("placeholder", globalState);
-        // }
-        //
-        // // For Future Custom Queries for Testing (Table Query Generation)
-        // if (true) {
-        // tableQueryGenerator.generateNExecute();
-        // } else {
-        // tableQueryGenerator.runQueryFromFile("placeholder", globalState);
-        // }
+        String staticTable = System.getProperty("staticTable");
+        // For Future Custom Queries for Testing (Table Creation)
+        if (staticTable == null || !staticTable.equals("true")) {
+            tableCreator.create();
+        } else {
+            tableCreator.runQueryFromFile("staticTable.sql", globalState);
+        }
+
+        String staticQuery = System.getProperty("staticQuery");
+        // For Future Custom Queries for Testing (Table Query Generation)
+        if (staticTable == null || !staticQuery.equals("true")) {
+            tableQueryGenerator.generateNExecute();
+        } else {
+            tableQueryGenerator.runQueryFromFile("staticQuery.sql", globalState);
+        }
     }
 
     public void tryDeleteFile(String fname) {
diff --git a/src/sqlancer/h2/H2Provider.java b/src/sqlancer/h2/H2Provider.java
index f8f509f6..19660390 100644
--- a/src/sqlancer/h2/H2Provider.java
+++ b/src/sqlancer/h2/H2Provider.java
@@ -35,21 +35,21 @@ public void generateDatabase(H2GlobalState globalState) throws Exception {
         // Generate random queries (Insert, Update, Delete, etc.)
         H2TableQueryGenerator tableQueryGenerator = new H2TableQueryGenerator(globalState);
 
-        tableCreator.create();
-        tableQueryGenerator.generateNExecute();
-        // // For Future Custom Queries for Testing (Table Creation)
-        // if (true) {
-        // tableCreator.create();
-        // } else {
-        // tableCreator.runQueryFromFile("placeholder", globalState);
-        // }
-        //
-        // // For Future Custom Queries for Testing (Table Query Generation)
-        // if (true) {
-        // tableQueryGenerator.generateNExecute();
-        // } else {
-        // tableQueryGenerator.runQueryFromFile("placeholder", globalState);
-        // }
+        String staticTable = System.getProperty("staticTable");
+        // For Future Custom Queries for Testing (Table Creation)
+        if (staticTable == null || !staticTable.equals("true")) {
+            tableCreator.create();
+        } else {
+            tableCreator.runQueryFromFile("staticTable.sql", globalState);
+        }
+
+        String staticQuery = System.getProperty("staticQuery");
+        // For Future Custom Queries for Testing (Table Query Generation)
+        if (staticTable == null || !staticQuery.equals("true")) {
+            tableQueryGenerator.generateNExecute();
+        } else {
+            tableQueryGenerator.runQueryFromFile("staticQuery.sql", globalState);
+        }
     }
 
     @Override
diff --git a/src/sqlancer/hsqldb/HSQLDBProvider.java b/src/sqlancer/hsqldb/HSQLDBProvider.java
index f0680e20..3b7f756b 100644
--- a/src/sqlancer/hsqldb/HSQLDBProvider.java
+++ b/src/sqlancer/hsqldb/HSQLDBProvider.java
@@ -49,22 +49,21 @@ public void generateDatabase(HSQLDBGlobalState globalState) throws Exception {
         // Generate random queries (Insert, Update, Delete, etc.)
         HSQLDBTableQueryGenerator tableQueryGenerator = new HSQLDBTableQueryGenerator(globalState);
 
-        tableCreator.create();
-        tableQueryGenerator.generateNExecute();
+        String staticTable = System.getProperty("staticTable");
+        // For Future Custom Queries for Testing (Table Creation)
+        if (staticTable == null || !staticTable.equals("true")) {
+            tableCreator.create();
+        } else {
+            tableCreator.runQueryFromFile("staticTable.sql", globalState);
+        }
 
-        // // For Future Custom Queries for Testing (Table Creation)
-        // if (true) {
-        // tableCreator.create();
-        // } else {
-        // tableCreator.runQueryFromFile("placeholder", globalState);
-        // }
-        //
-        // // For Future Custom Queries for Testing (Table Query Generation)
-        // if (true) {
-        // tableQueryGenerator.generateNExecute();
-        // } else {
-        // tableQueryGenerator.runQueryFromFile("placeholder", globalState);
-        // }
+        String staticQuery = System.getProperty("staticQuery");
+        // For Future Custom Queries for Testing (Table Query Generation)
+        if (staticTable == null || !staticQuery.equals("true")) {
+            tableQueryGenerator.generateNExecute();
+        } else {
+            tableQueryGenerator.runQueryFromFile("staticQuery.sql", globalState);
+        }
     }
 
     public static class HSQLDBGlobalState extends SQLGlobalState<HSQLDBOptions, HSQLDBSchema> {
diff --git a/src/sqlancer/mariadb/MariaDBProvider.java b/src/sqlancer/mariadb/MariaDBProvider.java
index 6d31998a..3e61ea71 100644
--- a/src/sqlancer/mariadb/MariaDBProvider.java
+++ b/src/sqlancer/mariadb/MariaDBProvider.java
@@ -30,22 +30,21 @@ public void generateDatabase(MariaDBGlobalState globalState) throws Exception {
         // Generate random queries (Insert, Update, Delete, etc.)
         MariaDBTableQueryGenerator tableQueryGenerator = new MariaDBTableQueryGenerator(globalState);
 
-        tableCreator.create();
-        tableQueryGenerator.generateNExecute();
+        String staticTable = System.getProperty("staticTable");
+        // For Future Custom Queries for Testing (Table Creation)
+        if (staticTable == null || !staticTable.equals("true")) {
+            tableCreator.create();
+        } else {
+            tableCreator.runQueryFromFile("staticTable.sql", globalState);
+        }
 
-        // // For Future Custom Queries for Testing (Table Creation)
-        // if (true) {
-        // tableCreator.create();
-        // } else {
-        // tableCreator.runQueryFromFile("placeholder", globalState);
-        // }
-        //
-        // // For Future Custom Queries for Testing (Table Query Generation)
-        // if (true) {
-        // tableQueryGenerator.generateNExecute();
-        // } else {
-        // tableQueryGenerator.runQueryFromFile("placeholder", globalState);
-        // }
+        String staticQuery = System.getProperty("staticQuery");
+        // For Future Custom Queries for Testing (Table Query Generation)
+        if (staticTable == null || !staticQuery.equals("true")) {
+            tableQueryGenerator.generateNExecute();
+        } else {
+            tableQueryGenerator.runQueryFromFile("staticQuery.sql", globalState);
+        }
     }
 
     public static class MariaDBGlobalState extends SQLGlobalState<MariaDBOptions, MariaDBSchema> {
diff --git a/src/sqlancer/mysql/MySQLProvider.java b/src/sqlancer/mysql/MySQLProvider.java
index daf9f947..a449a7d2 100644
--- a/src/sqlancer/mysql/MySQLProvider.java
+++ b/src/sqlancer/mysql/MySQLProvider.java
@@ -31,22 +31,21 @@ public void generateDatabase(MySQLGlobalState globalState) throws Exception {
         // Generate random queries (Insert, Update, Delete, etc.)
         MySQLTableQueryGenerator tableQueryGenerator = new MySQLTableQueryGenerator(globalState);
 
-        tableCreator.create();
-        tableQueryGenerator.generateNExecute();
+        String staticTable = System.getProperty("staticTable");
+        // For Future Custom Queries for Testing (Table Creation)
+        if (staticTable == null || !staticTable.equals("true")) {
+            tableCreator.create();
+        } else {
+            tableCreator.runQueryFromFile("staticTable.sql", globalState);
+        }
 
-        // // For Future Custom Queries for Testing (Table Creation)
-        // if (true) {
-        // tableCreator.create();
-        // } else {
-        // tableCreator.runQueryFromFile("placeholder", globalState);
-        // }
-        //
-        // // For Future Custom Queries for Testing (Table Query Generation)
-        // if (true) {
-        // tableQueryGenerator.generateNExecute();
-        // } else {
-        // tableQueryGenerator.runQueryFromFile("placeholder", globalState);
-        // }
+        String staticQuery = System.getProperty("staticQuery");
+        // For Future Custom Queries for Testing (Table Query Generation)
+        if (staticTable == null || !staticQuery.equals("true")) {
+            tableQueryGenerator.generateNExecute();
+        } else {
+            tableQueryGenerator.runQueryFromFile("staticQuery.sql", globalState);
+        }
 
         if (globalState.getDbmsSpecificOptions().getTestOracleFactory().stream()
                 .anyMatch((o) -> o == MySQLOracleFactory.CERT)) {
diff --git a/src/sqlancer/oceanbase/OceanBaseProvider.java b/src/sqlancer/oceanbase/OceanBaseProvider.java
index 94730319..ec0667b9 100644
--- a/src/sqlancer/oceanbase/OceanBaseProvider.java
+++ b/src/sqlancer/oceanbase/OceanBaseProvider.java
@@ -26,21 +26,21 @@ public void generateDatabase(OceanBaseGlobalState globalState) throws Exception
         // Generate random queries (Insert, Update, Delete, etc.)
         OceanBaseTableQueryGenerator tableQueryGenerator = new OceanBaseTableQueryGenerator(globalState);
 
-        tableCreator.create();
-        tableQueryGenerator.generateNExecute();
-        // // For Future Custom Queries for Testing (Table Creation)
-        // if (true) {
-        // tableCreator.create();
-        // } else {
-        // tableCreator.runQueryFromFile("placeholder", globalState);
-        // }
-        //
-        // // For Future Custom Queries for Testing (Table Query Generation)
-        // if (true) {
-        // tableQueryGenerator.generateNExecute();
-        // } else {
-        // tableQueryGenerator.runQueryFromFile("placeholder", globalState);
-        // }
+        String staticTable = System.getProperty("staticTable");
+        // For Future Custom Queries for Testing (Table Creation)
+        if (staticTable == null || !staticTable.equals("true")) {
+            tableCreator.create();
+        } else {
+            tableCreator.runQueryFromFile("staticTable.sql", globalState);
+        }
+
+        String staticQuery = System.getProperty("staticQuery");
+        // For Future Custom Queries for Testing (Table Query Generation)
+        if (staticTable == null || !staticQuery.equals("true")) {
+            tableQueryGenerator.generateNExecute();
+        } else {
+            tableQueryGenerator.runQueryFromFile("staticQuery.sql", globalState);
+        }
     }
 
     @Override
diff --git a/src/sqlancer/postgres/PostgresProvider.java b/src/sqlancer/postgres/PostgresProvider.java
index b267600d..e9902da8 100644
--- a/src/sqlancer/postgres/PostgresProvider.java
+++ b/src/sqlancer/postgres/PostgresProvider.java
@@ -56,22 +56,21 @@ public void generateDatabase(PostgresGlobalState globalState) throws Exception {
         // Generate random queries (Insert, Update, Delete, etc.)
         PostgresTableQueryGenerator tableQueryGenerator = new PostgresTableQueryGenerator(globalState);
 
-        tableCreator.create();
-        tableQueryGenerator.generateNExecute();
-
-        // // For Future Custom Queries for Testing (Table Creation)
-        // if (true) {
-        // tableCreator.create();
-        // } else {
-        // tableCreator.runQueryFromFile("placeholder", globalState);
-        // }
-        //
-        // // For Future Custom Queries for Testing (Table Query Generation)
-        // if (true) {
-        // tableQueryGenerator.generateNExecute();
-        // } else {
-        // tableQueryGenerator.runQueryFromFile("placeholder", globalState);
-        // }
+        String staticTable = System.getProperty("staticTable");
+        // For Future Custom Queries for Testing (Table Creation)
+        if (staticTable == null || !staticTable.equals("true")) {
+            tableCreator.create();
+        } else {
+            tableCreator.runQueryFromFile("staticTable.sql", globalState);
+        }
+
+        String staticQuery = System.getProperty("staticQuery");
+        // For Future Custom Queries for Testing (Table Query Generation)
+        if (staticTable == null || !staticQuery.equals("true")) {
+            tableQueryGenerator.generateNExecute();
+        } else {
+            tableQueryGenerator.runQueryFromFile("staticQuery.sql", globalState);
+        }
 
         extensionsList = globalState.getDbmsSpecificOptions().extensions;
         if (!extensionsList.isEmpty()) {
diff --git a/src/sqlancer/presto/PrestoProvider.java b/src/sqlancer/presto/PrestoProvider.java
index e1b0f513..2237075d 100644
--- a/src/sqlancer/presto/PrestoProvider.java
+++ b/src/sqlancer/presto/PrestoProvider.java
@@ -29,21 +29,21 @@ public void generateDatabase(PrestoGlobalState globalState) throws Exception {
         // Generate random queries (Insert, Update, Delete, etc.)
         PrestoTableQueryGenerator tableQueryGenerator = new PrestoTableQueryGenerator(globalState);
 
-        tableCreator.create();
-        tableQueryGenerator.generateNExecute();
-        // // For Future Custom Queries for Testing (Table Creation)
-        // if (true) {
-        // tableCreator.create();
-        // } else {
-        // tableCreator.runQueryFromFile("placeholder", globalState);
-        // }
-        //
-        // // For Future Custom Queries for Testing (Table Query Generation)
-        // if (true) {
-        // tableQueryGenerator.generateNExecute();
-        // } else {
-        // tableQueryGenerator.runQueryFromFile("placeholder", globalState);
-        // }
+        String staticTable = System.getProperty("staticTable");
+        // For Future Custom Queries for Testing (Table Creation)
+        if (staticTable == null || !staticTable.equals("true")) {
+            tableCreator.create();
+        } else {
+            tableCreator.runQueryFromFile("staticTable.sql", globalState);
+        }
+
+        String staticQuery = System.getProperty("staticQuery");
+        // For Future Custom Queries for Testing (Table Query Generation)
+        if (staticTable == null || !staticQuery.equals("true")) {
+            tableQueryGenerator.generateNExecute();
+        } else {
+            tableQueryGenerator.runQueryFromFile("staticQuery.sql", globalState);
+        }
     }
 
     @Override
diff --git a/src/sqlancer/questdb/QuestDBProvider.java b/src/sqlancer/questdb/QuestDBProvider.java
index 133b2e2b..1fbf7ca3 100644
--- a/src/sqlancer/questdb/QuestDBProvider.java
+++ b/src/sqlancer/questdb/QuestDBProvider.java
@@ -38,22 +38,21 @@ public void generateDatabase(QuestDBGlobalState globalState) throws Exception {
         // Generate random queries (Insert, Update, Delete, etc.)
         QuestDBTableQueryGenerator tableQueryGenerator = new QuestDBTableQueryGenerator(globalState);
 
-        tableCreator.create();
-        tableQueryGenerator.generateNExecute();
-
-        // // For Future Custom Queries for Testing (Table Creation)
-        // if (true) {
-        // tableCreator.create();
-        // } else {
-        // tableCreator.runQueryFromFile("placeholder", globalState);
-        // }
-        //
-        // // For Future Custom Queries for Testing (Table Query Generation)
-        // if (true) {
-        // tableQueryGenerator.generateNExecute();
-        // } else {
-        // tableQueryGenerator.runQueryFromFile("placeholder", globalState);
-        // }
+        String staticTable = System.getProperty("staticTable");
+        // For Future Custom Queries for Testing (Table Creation)
+        if (staticTable == null || !staticTable.equals("true")) {
+            tableCreator.create();
+        } else {
+            tableCreator.runQueryFromFile("staticTable.sql", globalState);
+        }
+
+        String staticQuery = System.getProperty("staticQuery");
+        // For Future Custom Queries for Testing (Table Query Generation)
+        if (staticTable == null || !staticQuery.equals("true")) {
+            tableQueryGenerator.generateNExecute();
+        } else {
+            tableQueryGenerator.runQueryFromFile("staticQuery.sql", globalState);
+        }
 
     }
 
diff --git a/src/sqlancer/tidb/TiDBProvider.java b/src/sqlancer/tidb/TiDBProvider.java
index 5b1b2565..e60ab375 100644
--- a/src/sqlancer/tidb/TiDBProvider.java
+++ b/src/sqlancer/tidb/TiDBProvider.java
@@ -44,22 +44,21 @@ public void generateDatabase(TiDBGlobalState globalState) throws Exception {
         // Generate random queries (Insert, Update, Delete, etc.)
         TiDBTableQueryGenerator tableQueryGenerator = new TiDBTableQueryGenerator(globalState);
 
-        tableCreator.create();
-        tableQueryGenerator.generateNExecute();
-
-        // // For Future Custom Queries for Testing (Table Creation)
-        // if (true) {
-        // tableCreator.create();
-        // } else {
-        // tableCreator.runQueryFromFile("placeholder", globalState);
-        // }
-        //
-        // // For Future Custom Queries for Testing (Table Query Generation)
-        // if (true) {
-        // tableQueryGenerator.generateNExecute();
-        // } else {
-        // tableQueryGenerator.runQueryFromFile("placeholder", globalState);
-        // }
+        String staticTable = System.getProperty("staticTable");
+        // For Future Custom Queries for Testing (Table Creation)
+        if (staticTable == null || !staticTable.equals("true")) {
+            tableCreator.create();
+        } else {
+            tableCreator.runQueryFromFile("staticTable.sql", globalState);
+        }
+
+        String staticQuery = System.getProperty("staticQuery");
+        // For Future Custom Queries for Testing (Table Query Generation)
+        if (staticTable == null || !staticQuery.equals("true")) {
+            tableQueryGenerator.generateNExecute();
+        } else {
+            tableQueryGenerator.runQueryFromFile("staticQuery.sql", globalState);
+        }
 
     }
 
diff --git a/src/sqlancer/yugabyte/ycql/YCQLProvider.java b/src/sqlancer/yugabyte/ycql/YCQLProvider.java
index f29d0b5b..05fbcd21 100644
--- a/src/sqlancer/yugabyte/ycql/YCQLProvider.java
+++ b/src/sqlancer/yugabyte/ycql/YCQLProvider.java
@@ -30,22 +30,21 @@ public void generateDatabase(YCQLGlobalState globalState) throws Exception {
         // Generate random queries (Insert, Update, Delete, etc.)
         YCQLTableQueryGenerator tableQueryGenerator = new YCQLTableQueryGenerator(globalState);
 
-        tableCreator.create();
-        tableQueryGenerator.generateNExecute();
-
-        // // For Future Custom Queries for Testing (Table Creation)
-        // if (true) {
-        // tableCreator.create();
-        // } else {
-        // tableCreator.runQueryFromFile("placeholder", globalState);
-        // }
-        //
-        // // For Future Custom Queries for Testing (Table Query Generation)
-        // if (true) {
-        // tableQueryGenerator.generateNExecute();
-        // } else {
-        // tableQueryGenerator.runQueryFromFile("placeholder", globalState);
-        // }
+        String staticTable = System.getProperty("staticTable");
+        // For Future Custom Queries for Testing (Table Creation)
+        if (staticTable == null || !staticTable.equals("true")) {
+            tableCreator.create();
+        } else {
+            tableCreator.runQueryFromFile("staticTable.sql", globalState);
+        }
+
+        String staticQuery = System.getProperty("staticQuery");
+        // For Future Custom Queries for Testing (Table Query Generation)
+        if (staticTable == null || !staticQuery.equals("true")) {
+            tableQueryGenerator.generateNExecute();
+        } else {
+            tableQueryGenerator.runQueryFromFile("staticQuery.sql", globalState);
+        }
     }
 
     @Override
diff --git a/src/sqlancer/yugabyte/ysql/YSQLProvider.java b/src/sqlancer/yugabyte/ysql/YSQLProvider.java
index 00d04b15..4de99bac 100644
--- a/src/sqlancer/yugabyte/ysql/YSQLProvider.java
+++ b/src/sqlancer/yugabyte/ysql/YSQLProvider.java
@@ -54,22 +54,21 @@ public void generateDatabase(YSQLGlobalState globalState) throws Exception {
         // Generate random queries (Insert, Update, Delete, etc.)
         YSQLTableQueryGenerator tableQueryGenerator = new YSQLTableQueryGenerator(globalState);
 
-        tableCreator.create();
-        tableQueryGenerator.generateNExecute();
-
-        // // For Future Custom Queries for Testing (Table Creation)
-        // if (true) {
-        // tableCreator.create();
-        // } else {
-        // tableCreator.runQueryFromFile("placeholder", globalState);
-        // }
-        //
-        // // For Future Custom Queries for Testing (Table Query Generation)
-        // if (true) {
-        // tableQueryGenerator.generateNExecute();
-        // } else {
-        // tableQueryGenerator.runQueryFromFile("placeholder", globalState);
-        // }
+        String staticTable = System.getProperty("staticTable");
+        // For Future Custom Queries for Testing (Table Creation)
+        if (staticTable == null || !staticTable.equals("true")) {
+            tableCreator.create();
+        } else {
+            tableCreator.runQueryFromFile("staticTable.sql", globalState);
+        }
+
+        String staticQuery = System.getProperty("staticQuery");
+        // For Future Custom Queries for Testing (Table Query Generation)
+        if (staticTable == null || !staticQuery.equals("true")) {
+            tableQueryGenerator.generateNExecute();
+        } else {
+            tableQueryGenerator.runQueryFromFile("staticQuery.sql", globalState);
+        }
     }
 
     @Override


Reviews:
user: login: copilot-pull-request-reviewer[bot]
body: ## Pull Request Overview

This PR updates various SQLancer provider classes to support configuration via system properties for static table creation and query generation. In addition, it renames classes to improve naming consistency.  
- Added retrieval of "staticTable" and "staticQuery" system properties in each provider  
- Introduced conditional logic to either create tables or run queries from files based on system properties  
- Renamed FileExecuter to FileExecutor in common classes

### Reviewed Changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 16 comments.

<details>
<summary>Show a summary per file</summary>

| File | Description |
| ---- | ----------- |
| src/sqlancer/yugabyte/ycql/YCQLProvider.java | Added system properties and conditional branching for static table and query execution |
| src/sqlancer/tidb/TiDBProvider.java | Similar changes for property-based branching in table creation and query generation |
| src/sqlancer/questdb/QuestDBProvider.java | Updated to use system properties for table creation and query generation |
| src/sqlancer/presto/PrestoProvider.java | Introduced system property handling for static table and query execution |
| src/sqlancer/postgres/PostgresProvider.java | Added property-based conditional logic for table and query handling |
| src/sqlancer/oceanbase/OceanBaseProvider.java | Updated to read system properties to control query generation paths |
| src/sqlancer/mysql/MySQLProvider.java | Incorporated system property checks for dynamic vs. file-based query execution |
| src/sqlancer/mariadb/MariaDBProvider.java | Extended property-based branching for table creation and query generation |
| src/sqlancer/hsqldb/HSQLDBProvider.java | Added property checks to switch between creation and file execution modes |
| src/sqlancer/h2/H2Provider.java | Updated to support system properties for table and query management |
| src/sqlancer/duckdb/DuckDBProvider.java | Introduced similar system property logic for query generation paths |
| src/sqlancer/doris/DorisProvider.java | Added static property handling to control table query generation flow |
| src/sqlancer/databend/DatabendProvider.java | Updated to read and respond to system properties regarding static queries |
| src/sqlancer/cockroachdb/CockroachDBProvider.java | Incorporated property-based conditional logic for query execution |
| src/sqlancer/cnosdb/CnosDBProvider.java | Updated to use system properties for controlling query execution methods |
| src/sqlancer/clickhouse/ClickHouseProvider.java | Introduced similar property-based branching for dynamic vs. file-based query execution |
</details>





state: COMMENTED
author_association: NONE
submitted_at: 2025-03-30T07:01:21Z

Review comments:
diff_hunk: @@ -30,22 +30,21 @@ public void generateDatabase(YCQLGlobalState globalState) throws Exception {
         // Generate random queries (Insert, Update, Delete, etc.)
         YCQLTableQueryGenerator tableQueryGenerator = new YCQLTableQueryGenerator(globalState);
 
-        tableCreator.create();
-        tableQueryGenerator.generateNExecute();
-
-        // // For Future Custom Queries for Testing (Table Creation)
-        // if (true) {
-        // tableCreator.create();
-        // } else {
-        // tableCreator.runQueryFromFile("placeholder", globalState);
-        // }
-        //
-        // // For Future Custom Queries for Testing (Table Query Generation)
-        // if (true) {
-        // tableQueryGenerator.generateNExecute();
-        // } else {
-        // tableQueryGenerator.runQueryFromFile("placeholder", globalState);
-        // }
+        String staticTable = System.getProperty("staticTable");
+        // For Future Custom Queries for Testing (Table Creation)
+        if (staticTable == null || !staticTable.equals("true")) {
+            tableCreator.create();
+        } else {
+            tableCreator.runQueryFromFile("staticTable.sql", globalState);
+        }
+
+        String staticQuery = System.getProperty("staticQuery");
+        // For Future Custom Queries for Testing (Table Query Generation)
+        if (staticTable == null || !staticQuery.equals("true")) {
path: src/sqlancer/yugabyte/ycql/YCQLProvider.java
user: login: Copilot
body: The condition for the static query property erroneously checks 'staticTable' for null instead of 'staticQuery'. It should be updated to 'if (staticQuery == null || !staticQuery.equals("true")) {'.
```suggestion
        if (staticQuery == null || !staticQuery.equals("true")) {
```
created_at: 2025-03-30T07:01:17Z
author_association: NONE
diff_hunk: @@ -44,22 +44,21 @@ public void generateDatabase(TiDBGlobalState globalState) throws Exception {
         // Generate random queries (Insert, Update, Delete, etc.)
         TiDBTableQueryGenerator tableQueryGenerator = new TiDBTableQueryGenerator(globalState);
 
-        tableCreator.create();
-        tableQueryGenerator.generateNExecute();
-
-        // // For Future Custom Queries for Testing (Table Creation)
-        // if (true) {
-        // tableCreator.create();
-        // } else {
-        // tableCreator.runQueryFromFile("placeholder", globalState);
-        // }
-        //
-        // // For Future Custom Queries for Testing (Table Query Generation)
-        // if (true) {
-        // tableQueryGenerator.generateNExecute();
-        // } else {
-        // tableQueryGenerator.runQueryFromFile("placeholder", globalState);
-        // }
+        String staticTable = System.getProperty("staticTable");
+        // For Future Custom Queries for Testing (Table Creation)
+        if (staticTable == null || !staticTable.equals("true")) {
+            tableCreator.create();
+        } else {
+            tableCreator.runQueryFromFile("staticTable.sql", globalState);
+        }
+
+        String staticQuery = System.getProperty("staticQuery");
+        // For Future Custom Queries for Testing (Table Query Generation)
+        if (staticTable == null || !staticQuery.equals("true")) {
path: src/sqlancer/tidb/TiDBProvider.java
user: login: Copilot
body: The check for the static query property incorrectly verifies 'staticTable' for null. Replace it with 'staticQuery == null' to ensure the correct property is validated.
```suggestion
        if (staticQuery == null || !staticQuery.equals("true")) {
```
created_at: 2025-03-30T07:01:17Z
author_association: NONE
diff_hunk: @@ -38,22 +38,21 @@ public void generateDatabase(QuestDBGlobalState globalState) throws Exception {
         // Generate random queries (Insert, Update, Delete, etc.)
         QuestDBTableQueryGenerator tableQueryGenerator = new QuestDBTableQueryGenerator(globalState);
 
-        tableCreator.create();
-        tableQueryGenerator.generateNExecute();
-
-        // // For Future Custom Queries for Testing (Table Creation)
-        // if (true) {
-        // tableCreator.create();
-        // } else {
-        // tableCreator.runQueryFromFile("placeholder", globalState);
-        // }
-        //
-        // // For Future Custom Queries for Testing (Table Query Generation)
-        // if (true) {
-        // tableQueryGenerator.generateNExecute();
-        // } else {
-        // tableQueryGenerator.runQueryFromFile("placeholder", globalState);
-        // }
+        String staticTable = System.getProperty("staticTable");
+        // For Future Custom Queries for Testing (Table Creation)
+        if (staticTable == null || !staticTable.equals("true")) {
+            tableCreator.create();
+        } else {
+            tableCreator.runQueryFromFile("staticTable.sql", globalState);
+        }
+
+        String staticQuery = System.getProperty("staticQuery");
+        // For Future Custom Queries for Testing (Table Query Generation)
+        if (staticTable == null || !staticQuery.equals("true")) {
path: src/sqlancer/questdb/QuestDBProvider.java
user: login: Copilot
body: The null-check in the static query branch mistakenly refers to 'staticTable'. It should validate 'staticQuery' instead.
```suggestion
        if (staticQuery == null || !staticQuery.equals("true")) {
```
created_at: 2025-03-30T07:01:18Z
author_association: NONE
diff_hunk: @@ -29,21 +29,21 @@ public void generateDatabase(PrestoGlobalState globalState) throws Exception {
         // Generate random queries (Insert, Update, Delete, etc.)
         PrestoTableQueryGenerator tableQueryGenerator = new PrestoTableQueryGenerator(globalState);
 
-        tableCreator.create();
-        tableQueryGenerator.generateNExecute();
-        // // For Future Custom Queries for Testing (Table Creation)
-        // if (true) {
-        // tableCreator.create();
-        // } else {
-        // tableCreator.runQueryFromFile("placeholder", globalState);
-        // }
-        //
-        // // For Future Custom Queries for Testing (Table Query Generation)
-        // if (true) {
-        // tableQueryGenerator.generateNExecute();
-        // } else {
-        // tableQueryGenerator.runQueryFromFile("placeholder", globalState);
-        // }
+        String staticTable = System.getProperty("staticTable");
+        // For Future Custom Queries for Testing (Table Creation)
+        if (staticTable == null || !staticTable.equals("true")) {
+            tableCreator.create();
+        } else {
+            tableCreator.runQueryFromFile("staticTable.sql", globalState);
+        }
+
+        String staticQuery = System.getProperty("staticQuery");
+        // For Future Custom Queries for Testing (Table Query Generation)
+        if (staticTable == null || !staticQuery.equals("true")) {
path: src/sqlancer/presto/PrestoProvider.java
user: login: Copilot
body: The condition for checking the static query property erroneously uses 'staticTable' for the null check. Update it to check 'staticQuery' for correctness.
```suggestion
        if (staticQuery == null || !staticQuery.equals("true")) {
```
created_at: 2025-03-30T07:01:18Z
author_association: NONE
diff_hunk: @@ -56,22 +56,21 @@ public void generateDatabase(PostgresGlobalState globalState) throws Exception {
         // Generate random queries (Insert, Update, Delete, etc.)
         PostgresTableQueryGenerator tableQueryGenerator = new PostgresTableQueryGenerator(globalState);
 
-        tableCreator.create();
-        tableQueryGenerator.generateNExecute();
-
-        // // For Future Custom Queries for Testing (Table Creation)
-        // if (true) {
-        // tableCreator.create();
-        // } else {
-        // tableCreator.runQueryFromFile("placeholder", globalState);
-        // }
-        //
-        // // For Future Custom Queries for Testing (Table Query Generation)
-        // if (true) {
-        // tableQueryGenerator.generateNExecute();
-        // } else {
-        // tableQueryGenerator.runQueryFromFile("placeholder", globalState);
-        // }
+        String staticTable = System.getProperty("staticTable");
+        // For Future Custom Queries for Testing (Table Creation)
+        if (staticTable == null || !staticTable.equals("true")) {
+            tableCreator.create();
+        } else {
+            tableCreator.runQueryFromFile("staticTable.sql", globalState);
+        }
+
+        String staticQuery = System.getProperty("staticQuery");
+        // For Future Custom Queries for Testing (Table Query Generation)
+        if (staticTable == null || !staticQuery.equals("true")) {
path: src/sqlancer/postgres/PostgresProvider.java
user: login: Copilot
body: The condition incorrectly verifies 'staticTable' for null in the static query branch. It should be modified to 'if (staticQuery == null || !staticQuery.equals("true")) {'.
```suggestion
        if (staticQuery == null || !staticQuery.equals("true")) {
```
created_at: 2025-03-30T07:01:18Z
author_association: NONE
diff_hunk: @@ -26,21 +26,21 @@ public void generateDatabase(OceanBaseGlobalState globalState) throws Exception
         // Generate random queries (Insert, Update, Delete, etc.)
         OceanBaseTableQueryGenerator tableQueryGenerator = new OceanBaseTableQueryGenerator(globalState);
 
-        tableCreator.create();
-        tableQueryGenerator.generateNExecute();
-        // // For Future Custom Queries for Testing (Table Creation)
-        // if (true) {
-        // tableCreator.create();
-        // } else {
-        // tableCreator.runQueryFromFile("placeholder", globalState);
-        // }
-        //
-        // // For Future Custom Queries for Testing (Table Query Generation)
-        // if (true) {
-        // tableQueryGenerator.generateNExecute();
-        // } else {
-        // tableQueryGenerator.runQueryFromFile("placeholder", globalState);
-        // }
+        String staticTable = System.getProperty("staticTable");
+        // For Future Custom Queries for Testing (Table Creation)
+        if (staticTable == null || !staticTable.equals("true")) {
+            tableCreator.create();
+        } else {
+            tableCreator.runQueryFromFile("staticTable.sql", globalState);
+        }
+
+        String staticQuery = System.getProperty("staticQuery");
+        // For Future Custom Queries for Testing (Table Query Generation)
+        if (staticTable == null || !staticQuery.equals("true")) {
path: src/sqlancer/oceanbase/OceanBaseProvider.java
user: login: Copilot
body: The static query condition mistakenly checks 'staticTable' for null. Replace it with a check on 'staticQuery' to ensure proper behavior.
```suggestion
        if (staticQuery == null || !staticQuery.equals("true")) {
```
created_at: 2025-03-30T07:01:18Z
author_association: NONE
diff_hunk: @@ -31,22 +31,21 @@ public void generateDatabase(MySQLGlobalState globalState) throws Exception {
         // Generate random queries (Insert, Update, Delete, etc.)
         MySQLTableQueryGenerator tableQueryGenerator = new MySQLTableQueryGenerator(globalState);
 
-        tableCreator.create();
-        tableQueryGenerator.generateNExecute();
+        String staticTable = System.getProperty("staticTable");
+        // For Future Custom Queries for Testing (Table Creation)
+        if (staticTable == null || !staticTable.equals("true")) {
+            tableCreator.create();
+        } else {
+            tableCreator.runQueryFromFile("staticTable.sql", globalState);
+        }
 
-        // // For Future Custom Queries for Testing (Table Creation)
-        // if (true) {
-        // tableCreator.create();
-        // } else {
-        // tableCreator.runQueryFromFile("placeholder", globalState);
-        // }
-        //
-        // // For Future Custom Queries for Testing (Table Query Generation)
-        // if (true) {
-        // tableQueryGenerator.generateNExecute();
-        // } else {
-        // tableQueryGenerator.runQueryFromFile("placeholder", globalState);
-        // }
+        String staticQuery = System.getProperty("staticQuery");
+        // For Future Custom Queries for Testing (Table Query Generation)
+        if (staticTable == null || !staticQuery.equals("true")) {
path: src/sqlancer/mysql/MySQLProvider.java
user: login: Copilot
body: The condition for static query execution incorrectly validates 'staticTable' for null. It should instead check 'staticQuery' to avoid unexpected behavior.
```suggestion
        if (staticQuery == null || !staticQuery.equals("true")) {
```
created_at: 2025-03-30T07:01:19Z
author_association: NONE
diff_hunk: @@ -30,22 +30,21 @@ public void generateDatabase(MariaDBGlobalState globalState) throws Exception {
         // Generate random queries (Insert, Update, Delete, etc.)
         MariaDBTableQueryGenerator tableQueryGenerator = new MariaDBTableQueryGenerator(globalState);
 
-        tableCreator.create();
-        tableQueryGenerator.generateNExecute();
+        String staticTable = System.getProperty("staticTable");
+        // For Future Custom Queries for Testing (Table Creation)
+        if (staticTable == null || !staticTable.equals("true")) {
+            tableCreator.create();
+        } else {
+            tableCreator.runQueryFromFile("staticTable.sql", globalState);
+        }
 
-        // // For Future Custom Queries for Testing (Table Creation)
-        // if (true) {
-        // tableCreator.create();
-        // } else {
-        // tableCreator.runQueryFromFile("placeholder", globalState);
-        // }
-        //
-        // // For Future Custom Queries for Testing (Table Query Generation)
-        // if (true) {
-        // tableQueryGenerator.generateNExecute();
-        // } else {
-        // tableQueryGenerator.runQueryFromFile("placeholder", globalState);
-        // }
+        String staticQuery = System.getProperty("staticQuery");
+        // For Future Custom Queries for Testing (Table Query Generation)
+        if (staticTable == null || !staticQuery.equals("true")) {
path: src/sqlancer/mariadb/MariaDBProvider.java
user: login: Copilot
body: The null-check in the static query branch is incorrect; it checks 'staticTable' instead of 'staticQuery'. Change it to 'if (staticQuery == null || !staticQuery.equals("true")) {'.
```suggestion
        if (staticQuery == null || !staticQuery.equals("true")) {
```
created_at: 2025-03-30T07:01:19Z
author_association: NONE
diff_hunk: @@ -49,22 +49,21 @@ public void generateDatabase(HSQLDBGlobalState globalState) throws Exception {
         // Generate random queries (Insert, Update, Delete, etc.)
         HSQLDBTableQueryGenerator tableQueryGenerator = new HSQLDBTableQueryGenerator(globalState);
 
-        tableCreator.create();
-        tableQueryGenerator.generateNExecute();
+        String staticTable = System.getProperty("staticTable");
+        // For Future Custom Queries for Testing (Table Creation)
+        if (staticTable == null || !staticTable.equals("true")) {
+            tableCreator.create();
+        } else {
+            tableCreator.runQueryFromFile("staticTable.sql", globalState);
+        }
 
-        // // For Future Custom Queries for Testing (Table Creation)
-        // if (true) {
-        // tableCreator.create();
-        // } else {
-        // tableCreator.runQueryFromFile("placeholder", globalState);
-        // }
-        //
-        // // For Future Custom Queries for Testing (Table Query Generation)
-        // if (true) {
-        // tableQueryGenerator.generateNExecute();
-        // } else {
-        // tableQueryGenerator.runQueryFromFile("placeholder", globalState);
-        // }
+        String staticQuery = System.getProperty("staticQuery");
+        // For Future Custom Queries for Testing (Table Query Generation)
+        if (staticTable == null || !staticQuery.equals("true")) {
path: src/sqlancer/hsqldb/HSQLDBProvider.java
user: login: Copilot
body: The condition mistakenly checks 'staticTable' for null in the static query logic; it should check 'staticQuery' to correctly evaluate the property.
```suggestion
        if (staticQuery == null || !staticQuery.equals("true")) {
```
created_at: 2025-03-30T07:01:19Z
author_association: NONE
diff_hunk: @@ -35,21 +35,21 @@ public void generateDatabase(H2GlobalState globalState) throws Exception {
         // Generate random queries (Insert, Update, Delete, etc.)
         H2TableQueryGenerator tableQueryGenerator = new H2TableQueryGenerator(globalState);
 
-        tableCreator.create();
-        tableQueryGenerator.generateNExecute();
-        // // For Future Custom Queries for Testing (Table Creation)
-        // if (true) {
-        // tableCreator.create();
-        // } else {
-        // tableCreator.runQueryFromFile("placeholder", globalState);
-        // }
-        //
-        // // For Future Custom Queries for Testing (Table Query Generation)
-        // if (true) {
-        // tableQueryGenerator.generateNExecute();
-        // } else {
-        // tableQueryGenerator.runQueryFromFile("placeholder", globalState);
-        // }
+        String staticTable = System.getProperty("staticTable");
+        // For Future Custom Queries for Testing (Table Creation)
+        if (staticTable == null || !staticTable.equals("true")) {
+            tableCreator.create();
+        } else {
+            tableCreator.runQueryFromFile("staticTable.sql", globalState);
+        }
+
+        String staticQuery = System.getProperty("staticQuery");
+        // For Future Custom Queries for Testing (Table Query Generation)
+        if (staticTable == null || !staticQuery.equals("true")) {
path: src/sqlancer/h2/H2Provider.java
user: login: Copilot
body: In the static query branch, the condition incorrectly checks 'staticTable' for null instead of 'staticQuery'. Update the check accordingly.
```suggestion
        if (staticQuery == null || !staticQuery.equals("true")) {
```
created_at: 2025-03-30T07:01:19Z
author_association: NONE
diff_hunk: @@ -37,22 +37,21 @@ public void generateDatabase(DuckDBGlobalState globalState) throws Exception {
         // Generate random queries (Insert, Update, Delete, etc.)
         DuckDBTableQueryGenerator tableQueryGenerator = new DuckDBTableQueryGenerator(globalState);
 
-        tableCreator.create();
-        tableQueryGenerator.generateNExecute();
-
-        // // For Future Custom Queries for Testing (Table Creation)
-        // if (true) {
-        // tableCreator.create();
-        // } else {
-        // tableCreator.runQueryFromFile("placeholder", globalState);
-        // }
-        //
-        // // For Future Custom Queries for Testing (Table Query Generation)
-        // if (true) {
-        // tableQueryGenerator.generateNExecute();
-        // } else {
-        // tableQueryGenerator.runQueryFromFile("placeholder", globalState);
-        // }
+        String staticTable = System.getProperty("staticTable");
+        // For Future Custom Queries for Testing (Table Creation)
+        if (staticTable == null || !staticTable.equals("true")) {
+            tableCreator.create();
+        } else {
+            tableCreator.runQueryFromFile("staticTable.sql", globalState);
+        }
+
+        String staticQuery = System.getProperty("staticQuery");
+        // For Future Custom Queries for Testing (Table Query Generation)
+        if (staticTable == null || !staticQuery.equals("true")) {
path: src/sqlancer/duckdb/DuckDBProvider.java
user: login: Copilot
body: The null-check for the static query property incorrectly refers to 'staticTable'. It should check 'staticQuery' to ensure the intended behavior.
```suggestion
        if (staticQuery == null || !staticQuery.equals("true")) {
```
created_at: 2025-03-30T07:01:20Z
author_association: NONE
diff_hunk: @@ -35,21 +35,21 @@ public void generateDatabase(DorisGlobalState globalState) throws Exception {
         // Generate random queries (Insert, Update, Delete, etc.)
         DorisTableQueryGenerator tableQueryGenerator = new DorisTableQueryGenerator(globalState);
 
-        tableCreator.create();
-        tableQueryGenerator.generateNExecute();
-        // // For Future Custom Queries for Testing (Table Creation)
-        // if (true) {
-        // tableCreator.create();
-        // } else {
-        // tableCreator.runQueryFromFile("placeholder", globalState);
-        // }
-        //
-        // // For Future Custom Queries for Testing (Table Query Generation)
-        // if (true) {
-        // tableQueryGenerator.generateNExecute();
-        // } else {
-        // tableQueryGenerator.runQueryFromFile("placeholder", globalState);
-        // }
+        String staticTable = System.getProperty("staticTable");
+        // For Future Custom Queries for Testing (Table Creation)
+        if (staticTable == null || !staticTable.equals("true")) {
+            tableCreator.create();
+        } else {
+            tableCreator.runQueryFromFile("staticTable.sql", globalState);
+        }
+
+        String staticQuery = System.getProperty("staticQuery");
+        // For Future Custom Queries for Testing (Table Query Generation)
+        if (staticTable == null || !staticQuery.equals("true")) {
path: src/sqlancer/doris/DorisProvider.java
user: login: Copilot
body: The condition for the static query branch erroneously checks 'staticTable' for null; it should be 'staticQuery' instead.
```suggestion
        if (staticQuery == null || !staticQuery.equals("true")) {
```
created_at: 2025-03-30T07:01:20Z
author_association: NONE
diff_hunk: @@ -37,22 +37,21 @@ public void generateDatabase(DatabendGlobalState globalState) throws Exception {
         // Generate random queries (Insert, Update, Delete, etc.)
         DatabendTableQueryGenerator tableQueryGenerator = new DatabendTableQueryGenerator(globalState);
 
-        tableCreator.create();
-        tableQueryGenerator.generateNExecute();
+        String staticTable = System.getProperty("staticTable");
+        // For Future Custom Queries for Testing (Table Creation)
+        if (staticTable == null || !staticTable.equals("true")) {
+            tableCreator.create();
+        } else {
+            tableCreator.runQueryFromFile("staticTable.sql", globalState);
+        }
 
-        // // For Future Custom Queries for Testing (Table Creation)
-        // if (true) {
-        // tableCreator.create();
-        // } else {
-        // tableCreator.runQueryFromFile("placeholder", globalState);
-        // }
-        //
-        // // For Future Custom Queries for Testing (Table Query Generation)
-        // if (true) {
-        // tableQueryGenerator.generateNExecute();
-        // } else {
-        // tableQueryGenerator.runQueryFromFile("placeholder", globalState);
-        // }
+        String staticQuery = System.getProperty("staticQuery");
+        // For Future Custom Queries for Testing (Table Query Generation)
+        if (staticTable == null || !staticQuery.equals("true")) {
path: src/sqlancer/databend/DatabendProvider.java
user: login: Copilot
body: The check for the static query property incorrectly validates 'staticTable' for null. It should use 'staticQuery' in the condition instead.
```suggestion
        if (staticQuery == null || !staticQuery.equals("true")) {
```
created_at: 2025-03-30T07:01:20Z
author_association: NONE
diff_hunk: @@ -71,21 +71,21 @@ public void generateDatabase(CockroachDBGlobalState globalState) throws Exceptio
         // Generate random queries (Insert, Update, Delete, etc.)
         CockroachDBTableQueryGenerator tableQueryGenerator = new CockroachDBTableQueryGenerator(globalState);
 
-        tableCreator.create();
-        tableQueryGenerator.generateNExecute();
-        // // For Future Custom Queries for Testing (Table Creation)
-        // if (true) {
-        // tableCreator.create();
-        // } else {
-        // tableCreator.runQueryFromFile("placeholder", globalState);
-        // }
-        //
-        // // For Future Custom Queries for Testing (Table Query Generation)
-        // if (true) {
-        // tableQueryGenerator.generateNExecute();
-        // } else {
-        // tableQueryGenerator.runQueryFromFile("placeholder", globalState);
-        // }
+        String staticTable = System.getProperty("staticTable");
+        // For Future Custom Queries for Testing (Table Creation)
+        if (staticTable == null || !staticTable.equals("true")) {
+            tableCreator.create();
+        } else {
+            tableCreator.runQueryFromFile("staticTable.sql", globalState);
+        }
+
+        String staticQuery = System.getProperty("staticQuery");
+        // For Future Custom Queries for Testing (Table Query Generation)
+        if (staticTable == null || !staticQuery.equals("true")) {
path: src/sqlancer/cockroachdb/CockroachDBProvider.java
user: login: Copilot
body: The condition for static query execution mistakenly checks 'staticTable' for null. It should be corrected to check 'staticQuery' to work as intended.
```suggestion
        if (staticQuery == null || !staticQuery.equals("true")) {
```
created_at: 2025-03-30T07:01:20Z
author_association: NONE
diff_hunk: @@ -36,22 +36,21 @@ public void generateDatabase(CnosDBGlobalState globalState) throws Exception {
         // Generate random queries (Insert, Update, Delete, etc.)
         CnosDBTableQueryGenerator tableQueryGenerator = new CnosDBTableQueryGenerator(globalState);
 
-        tableCreator.create();
-        tableQueryGenerator.generateNExecute();
-
-        // // For Future Custom Queries for Testing (Table Creation)
-        // if (true) {
-        // tableCreator.create();
-        // } else {
-        // tableCreator.runQueryFromFile("placeholder", globalState);
-        // }
-        //
-        // // For Future Custom Queries for Testing (Table Query Generation)
-        // if (true) {
-        // tableQueryGenerator.generateNExecute();
-        // } else {
-        // tableQueryGenerator.runQueryFromFile("placeholder", globalState);
-        // }
+        String staticTable = System.getProperty("staticTable");
+        // For Future Custom Queries for Testing (Table Creation)
+        if (staticTable == null || !staticTable.equals("true")) {
+            tableCreator.create();
+        } else {
+            tableCreator.runQueryFromFileCnos("staticTable.sql", globalState);
+        }
+
+        String staticQuery = System.getProperty("staticQuery");
+        // For Future Custom Queries for Testing (Table Query Generation)
+        if (staticTable == null || !staticQuery.equals("true")) {
path: src/sqlancer/cnosdb/CnosDBProvider.java
user: login: Copilot
body: The static query condition erroneously references 'staticTable' for the null check. Change it to 'if (staticQuery == null || !staticQuery.equals("true")) {' for correct behavior.
```suggestion
        if (staticQuery == null || !staticQuery.equals("true")) {
```
created_at: 2025-03-30T07:01:21Z
author_association: NONE
diff_hunk: @@ -57,22 +57,21 @@ public void generateDatabase(ClickHouseGlobalState globalState) throws Exception
         // Generate random queries (Insert, Update, Delete, etc.)
         ClickHouseTableQueryGenerator tableQueryGenerator = new ClickHouseTableQueryGenerator(globalState);
 
-        tableCreator.create();
-        tableQueryGenerator.generateNExecute();
-
-        // // For Future Custom Queries for Testing (Table Creation)
-        // if (true) {
-        // tableCreator.create();
-        // } else {
-        // tableCreator.runQueryFromFile("placeholder", globalState);
-        // }
-        //
-        // // For Future Custom Queries for Testing (Table Query Generation)
-        // if (true) {
-        // tableQueryGenerator.generateNExecute();
-        // } else {
-        // tableQueryGenerator.runQueryFromFile("placeholder", globalState);
-        // }
+        String staticTable = System.getProperty("staticTable");
+        // For Future Custom Queries for Testing (Table Creation)
+        if (staticTable == null || !staticTable.equals("true")) {
+            tableCreator.create();
+        } else {
+            tableCreator.runQueryFromFile("staticTable.sql", globalState);
+        }
+
+        String staticQuery = System.getProperty("staticQuery");
+        // For Future Custom Queries for Testing (Table Query Generation)
+        if (staticTable == null || !staticQuery.equals("true")) {
path: src/sqlancer/clickhouse/ClickHouseProvider.java
user: login: Copilot
body: The condition checking for the static query property incorrectly uses 'staticTable' in its null-check. It should validate 'staticQuery' instead.
```suggestion
        if (staticQuery == null || !staticQuery.equals("true")) {
```
created_at: 2025-03-30T07:01:21Z
author_association: NONE

PR comments:
user: login: sonarqubecloud[bot]
created_at: 2025-03-29T19:08:57Z
body: ## [![Quality Gate Failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-failed-20px.png 'Quality Gate Failed')](https://sonarcloud.io/dashboard?id=yorklim_CS3213_Team_17&pullRequest=92) **Quality Gate failed**  
Failed conditions  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/failed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=yorklim_CS3213_Team_17&pullRequest=92&metric=new_coverage&view=list) (required ≥ 80%)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/failed-16px.png '') [76.2% Duplication on New Code](https://sonarcloud.io/component_measures?id=yorklim_CS3213_Team_17&pullRequest=92&metric=new_duplicated_lines_density&view=list) (required ≤ 3%)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/failed-16px.png '') [E Reliability Rating on New Code](https://sonarcloud.io/dashboard?id=yorklim_CS3213_Team_17&pullRequest=92) (required ≥ A)  
  
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=yorklim_CS3213_Team_17&pullRequest=92)

##   
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/light_bulb-16px.png '') Catch issues before they fail your Quality Gate with our IDE extension ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/sonarlint-16px.png '') [SonarQube for IDE](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=pull-request)


author_association: NONE