FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix where clause in Materialize by def- · Pull Request #1293 · sqlancer/sqlancer · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .java  (4) .xml  (1) .yml  (1) All 3 file types selected
Only manifest files
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
10 changes: 2 additions & 8 deletions .github/workflows/main.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -392,10 +392,7 @@ jobs:
- name: Set up Materialize
run: |
docker pull materialize/materialized:latest
docker run -d -p6875:6875 -p6877:6877 -p 26257:26257 materialize/materialized:latest
sleep 5
# Workaround for https://github.com/cockroachdb/cockroach/issues/93892
psql postgres://root@localhost:26257 -c "SET CLUSTER SETTING sql.stats.forecasts.enabled = false"
docker run -e MZ_EAT_MY_DATA=1 -d -p6875:6875 -p6877:6877 materialize/materialized:latest
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
Expand All @@ -420,10 +417,7 @@ jobs:
- name: Set up Materialize
run: |
docker pull materialize/materialized:latest
docker run -d -p6875:6875 -p6877:6877 -p 26257:26257 materialize/materialized:latest
sleep 5
# Workaround for https://github.com/cockroachdb/cockroach/issues/93892
psql postgres://root@localhost:26257 -c "SET CLUSTER SETTING sql.stats.forecasts.enabled = false"
docker run -e MZ_EAT_MY_DATA=1 -d -p6875:6875 -p6877:6877 materialize/materialized:latest
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.8</version>
<version>0.8.12</version>
<executions>
<execution>
<goals>
Expand Down
11 changes: 8 additions & 3 deletions src/sqlancer/materialize/MaterializeProvider.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -240,12 +240,17 @@ protected void readFunctions(MaterializeGlobalState globalState) throws SQLExcep
}

protected void createTables(MaterializeGlobalState globalState, int numTables) throws Exception {
while (globalState.getSchema().getDatabaseTables().size() < numTables) {
int existingTables = globalState.getSchema().getDatabaseTables().size();
int createdTables = 0;
int nextTableIndex = existingTables;
while (existingTables + createdTables < numTables) {
try {
String tableName = DBMSCommon.createTableName(globalState.getSchema().getDatabaseTables().size());
String tableName = DBMSCommon.createTableName(nextTableIndex++);
SQLQueryAdapter createTable = MaterializeTableGenerator.generate(tableName, globalState.getSchema(),
generateOnlyKnown, globalState);
globalState.executeStatement(createTable);
if (globalState.executeStatement(createTable)) {
createdTables++;
}
} catch (IgnoreMeException e) {

}
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,7 @@ public String generateOptimizedQueryString(MaterializeSelect select, Materialize
}
select.setSelectType(SelectType.ALL);
}
select.setWhereClause(whereCondition);

return select.asString();
}
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public static SQLQueryAdapter insert(MaterializeGlobalState globalState) {
MaterializeCommon.addCommonExpressionErrors(errors);
errors.add("multiple assignments to same column");
errors.add("violates foreign key constraint");
errors.add("value too long for type character varying");
errors.add("value too long for type character");
errors.add("conflicting key value violates exclusion constraint");
errors.add("violates not-null constraint");
errors.add("current transaction is aborted");
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public MaterializeTableGenerator(String tableName, MaterializeSchema newSchema,
errors.add("no collation was derived for partition key column");
errors.add("inherits from generated column but specifies identity");
errors.add("inherits from generated column but specifies default");
errors.add("already exists");
MaterializeCommon.addCommonExpressionErrors(errors);
MaterializeCommon.addCommonTableErrors(errors);
}
Expand Down
Loading

Back | FazBrowse Home | New Git URL