use of org.apache.drill.exec.physical.impl.xsort.managed.PriorityQueueCopierWrapper.BatchMerger in project drill by axbaretto.
the class TestCopier method testEmptyInput.
@Test
public void testEmptyInput() throws Exception {
BatchSchema schema = SortTestUtilities.nonNullSchema();
List<BatchGroup> batches = new ArrayList<>();
Sort popConfig = SortTestUtilities.makeCopierConfig(Ordering.ORDER_ASC, Ordering.NULLS_UNSPECIFIED);
OperatorContext opContext = fixture.newOperatorContext(popConfig);
PriorityQueueCopierWrapper copier = new PriorityQueueCopierWrapper(opContext);
VectorContainer dest = new VectorContainer();
try {
// TODO: Create a vector allocator to pass as last parameter so
// that the test uses the same vector allocator as the production
// code. Only nuisance is that we don't have the required metadata
// readily at hand here...
@SuppressWarnings({ "resource", "unused" }) BatchMerger merger = copier.startMerge(schema, batches, dest, 10, null);
fail();
} catch (AssertionError e) {
// Expected
} finally {
opContext.close();
}
}
Aggregations