Skip to content

Commit b2a400d

Browse files
committed
[SLT] Disable known broken tests
Signed-off-by: Mihai Budiu <mbudiu@feldera.com>
1 parent 88845e2 commit b2a400d

File tree

3 files changed

+19
-6
lines changed

3 files changed

+19
-6
lines changed

sql-to-dbsp-compiler/slt/skip.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// This file contains a list of buggy tests to skip
2+
// test/random/expr/slt_good_101.test: test 5863, division by zero
3+
SELECT DISTINCT ( + + 88 ) + 69 + - - 22 / - + 0 * - 93 * CASE - CASE ( - COUNT ( * ) ) WHEN - 77 * - 44 - COUNT ( * ) + + 99 THEN - MIN ( - 30 ) WHEN - 30 THEN NULL WHEN + ( + 80 ) + + 33 / + COALESCE ( - - 93, - MAX ( DISTINCT 58 ) ) + - 99 * + 90 THEN - + COUNT ( * ) - AVG ( DISTINCT - 74 ) / 10 ELSE NULL END WHEN 16 THEN 3 END * + 78
4+
// test/random/expr/slt_good_103.test: test 7216, multiply with overflow
5+
SELECT DISTINCT - 96 * + 47 * ( + - 98 ) * + - 98 * 33 * + 9 * CASE MIN ( - 85 ) WHEN - + 96 * - COUNT ( * ) + 81 + + COUNT ( * ) * - 37 THEN - 69 * 58 WHEN + COALESCE ( + 16, 36 * + 30 ) THEN NULL END * - + CAST ( - + 95 AS INTEGER ) * - 33
6+
// test/random/expr/slt_good_102.test: test 197, division by zero
7+
SELECT ALL CASE - 6 WHEN + 70 + ( 81 ) THEN NULL WHEN COALESCE ( - 22, - + COALESCE ( - 64, + 65 / 49 + - + 62, - - NULLIF ( + 57, COUNT ( ALL - CASE 58 WHEN + 17 - 80 THEN 72 * - 40 + 54 * + 58 WHEN - CAST ( NULL AS INTEGER ) THEN NULL WHEN - 59 + 45 / + COALESCE ( 54 / 88, CAST ( NULL AS INTEGER ) * - 22 + - 58 * + 98 ) THEN - 18 / 20 ELSE NULL END ) * 3 ) ) * - MAX ( DISTINCT + 46 * - 27 ), AVG ( ALL 22 ) ) THEN NULL WHEN 23 THEN 42 - + MAX ( 52 ) END

sql-to-dbsp-compiler/slt/src/main/java/org/dbsp/sqllogictest/Main.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ public static void rotateTests() throws IOException, ClassNotFoundException {
8888
public static void main(String[] argv) throws IOException, ClassNotFoundException {
8989
Class.forName("org.hsqldb.jdbcDriver");
9090
List<String> files = Linq.list(
91+
// "test/random/expr/slt_good_102.test"
9192
/*
9293
"select1.test"
9394
"select2.test",
@@ -113,7 +114,7 @@ public static void main(String[] argv) throws IOException, ClassNotFoundExceptio
113114

114115
String[] args = {
115116
"-v", "-x", "-inc",
116-
"-e", "hybrid", // executor
117+
"-e", "hybrid", "-b", "slt/skip.txt",
117118
};
118119
if (argv.length > 0) {
119120
args = argv;
@@ -124,6 +125,7 @@ public static void main(String[] argv) throws IOException, ClassNotFoundExceptio
124125
args = a.toArray(new String[0]);
125126
}
126127
System.out.println(Arrays.toString(args));
128+
System.out.println("WD: " + System.getProperty("user.dir"));
127129
OptionsParser parser = new OptionsParser(true, System.out, System.err);
128130
// Used for debugging: how many tests to skip from the first file
129131
AtomicReference<Integer> skip = new AtomicReference<>();

sql-to-dbsp-compiler/slt/src/main/java/org/dbsp/sqllogictest/executors/DBSPExecutor.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
import org.dbsp.sqlCompiler.ir.expression.literal.DBSPUSizeLiteral;
6161
import org.dbsp.sqlCompiler.ir.expression.DBSPArrayExpression;
6262
import org.dbsp.sqlCompiler.ir.expression.DBSPZSetExpression;
63+
import org.dbsp.sqlCompiler.ir.statement.DBSPComment;
6364
import org.dbsp.sqlCompiler.ir.statement.DBSPLetStatement;
6465
import org.dbsp.sqlCompiler.ir.statement.DBSPStatement;
6566
import org.dbsp.sqlCompiler.ir.type.DBSPType;
@@ -196,8 +197,7 @@ boolean runBatch(TestStatistics result, boolean cleanup) {
196197
this.writeCodeToFile(compiler, Linq.list(inputFunction), codeGenerated);
197198
this.startTest();
198199
if (this.execute) {
199-
String[] extraArgs = new String[0];
200-
Utilities.compileAndTestRust(Main.getAbsoluteRustDirectory(), true, extraArgs);
200+
Utilities.compileAndTestRust(Main.getAbsoluteRustDirectory(), true);
201201
}
202202
this.queriesToRun.clear();
203203
System.out.println(elapsedTime(queryNo));
@@ -290,6 +290,7 @@ ProgramAndTester generateTestCase(
290290
compiler.submitStatementForCompilation(dbspQuery);
291291
compiler.throwIfErrorsOccurred();
292292
DBSPCircuit circuit = compiler.getFinalCircuit(false);
293+
assert circuit != null;
293294
circuit.setName("circuit" + suffix);
294295
DBSPNode.done();
295296

@@ -310,7 +311,7 @@ ProgramAndTester generateTestCase(
310311
}
311312

312313
return createTesterCode(
313-
"tester" + suffix, circuit, outputNumber,
314+
"tester" + suffix, origQuery, circuit, outputNumber,
314315
gen.getInputFunction(),
315316
compiler.getTableContents(),
316317
expectedOutput, testQuery.outputDescription);
@@ -416,22 +417,25 @@ public TestStatistics execute(SltTestFile file, OptionsParser.SuppliedOptions op
416417
/**
417418
* Generates a Rust function which tests a DBSP circuit.
418419
* @param name Name of the generated function.
420+
* @param query Query that is being tested.
419421
* @param circuit DBSP circuit that will be tested.
420422
* @param output Expected data from the circuit.
421423
* @param description Description of the expected outputs.
422424
* @param outputNumber Position of data output in output vector.
423425
* @return The code for a function that runs the circuit with the specified
424-
* input and tests the produced output.
425-
*/
426+
* input and tests the produced output. */
426427
static ProgramAndTester createTesterCode(
427428
String name,
429+
String query,
428430
DBSPCircuit circuit,
429431
int outputNumber,
430432
DBSPFunction inputGeneratingFunction,
431433
TableContents contents,
432434
@Nullable DBSPZSetExpression output,
433435
SqlTestQueryOutputDescription description) {
434436
List<DBSPStatement> list = new ArrayList<>();
437+
DBSPComment comment = new DBSPComment(query);
438+
list.add(comment);
435439
DBSPExpression arg = new DBSPApplyExpression(
436440
"CircuitConfig::with_workers", DBSPTypeAny.getDefault(), new DBSPUSizeLiteral(2)); // workers
437441
DBSPLetStatement cas = new DBSPLetStatement("circ",

0 commit comments

Comments
 (0)