|
39 | 39 | import org.dbsp.sqlCompiler.compiler.frontend.TableContents; |
40 | 40 | import org.dbsp.sqlCompiler.compiler.frontend.calciteCompiler.ProgramIdentifier; |
41 | 41 | import org.dbsp.sqlCompiler.compiler.frontend.calciteObject.CalciteObject; |
| 42 | +import org.dbsp.sqlCompiler.compiler.visitors.inner.CreateRuntimeErrorWrappers; |
42 | 43 | import org.dbsp.sqlCompiler.ir.DBSPFunction; |
43 | 44 | import org.dbsp.sqlCompiler.ir.DBSPNode; |
44 | 45 | import org.dbsp.sqlCompiler.ir.expression.DBSPApplyExpression; |
@@ -216,7 +217,8 @@ boolean runBatch(TestStatistics result, boolean cleanup) { |
216 | 217 | } |
217 | 218 |
|
218 | 219 | /** Convert a description of the data in the SLT format to a ZSet. */ |
219 | | - public static DBSPZSetExpression convert(@Nullable List<String> data, DBSPTypeZSet outputType) { |
| 220 | + public static DBSPZSetExpression convert( |
| 221 | + DBSPCompiler compiler, @Nullable List<String> data, DBSPTypeZSet outputType) { |
220 | 222 | if (data == null) |
221 | 223 | data = Linq.list(); |
222 | 224 | DBSPZSetExpression result; |
@@ -272,6 +274,8 @@ else if (colType.is(DBSPTypeBool.class)) |
272 | 274 | throw new RuntimeException("Could not assign all query output values to rows. " + |
273 | 275 | "I have " + col + " leftover values in the last row"); |
274 | 276 | } |
| 277 | + CreateRuntimeErrorWrappers cw = new CreateRuntimeErrorWrappers(compiler); |
| 278 | + result = cw.apply(result).to(DBSPZSetExpression.class); |
275 | 279 | return result; |
276 | 280 | } |
277 | 281 |
|
@@ -311,7 +315,7 @@ ProgramAndTester generateTestCase( |
311 | 315 | DBSPTypeZSet outputType = sink.outputType.to(DBSPTypeZSet.class); |
312 | 316 | DBSPZSetExpression expectedOutput = null; |
313 | 317 | if (testQuery.outputDescription.hash == null) { |
314 | | - expectedOutput = DBSPExecutor.convert(testQuery.outputDescription.getQueryResults(), outputType); |
| 318 | + expectedOutput = DBSPExecutor.convert(compiler, testQuery.outputDescription.getQueryResults(), outputType); |
315 | 319 | } |
316 | 320 |
|
317 | 321 | return createTesterCode( |
|
0 commit comments