Search in sources :

Example 1 with ExecutionModel

use of io.questdb.griffin.model.ExecutionModel in project questdb by bluestreak01.

the class AbstractSqlParserTest method assertModel.

protected void assertModel(String expected, String query, int modelType, TableModel... tableModels) throws SqlException {
    createModelsAndRun(() -> {
        sink.clear();
        ExecutionModel model = compiler.testCompileModel(query, sqlExecutionContext);
        Assert.assertEquals(model.getModelType(), modelType);
        ((Sinkable) model).toSink(sink);
        if (model instanceof QueryModel) {
            validateTopDownColumns((QueryModel) model);
        }
        TestUtils.assertEquals(expected, sink);
    }, tableModels);
}
Also used : ExecutionModel(io.questdb.griffin.model.ExecutionModel) QueryModel(io.questdb.griffin.model.QueryModel)

Aggregations

ExecutionModel (io.questdb.griffin.model.ExecutionModel)1 QueryModel (io.questdb.griffin.model.QueryModel)1