use of io.crate.testing.QueryTester in project crate by crate.
the class ByteColumnReferenceTest method testByteExpression.
@Test
public void testByteExpression() throws Exception {
QueryTester.Builder builder = new QueryTester.Builder(createTempDir(), THREAD_POOL, clusterService, Version.CURRENT, "create table t (x byte)");
builder.indexValues("x", IntStream.range(-2, 3).boxed().toArray());
try (QueryTester tester = builder.build()) {
List<Object> objects = tester.runQuery("x", "true");
assertThat(objects, Matchers.contains((byte) -2, (byte) -1, (byte) 0, (byte) 1, (byte) 2));
}
}
Aggregations