use of org.teiid.query.processor.relational.BlockingFakeRelationalNode in project teiid by teiid.
the class TestEnginePerformance method helpTestSort.
public void helpTestSort(Mode mode, int expectedRowCount, List<? extends Expression> sortElements, List<?>[] data, List<? extends Expression> elems, BufferManager bufferManager) throws TeiidComponentException, TeiidProcessingException {
// $NON-NLS-1$ //$NON-NLS-2$
CommandContext context = new CommandContext("pid", "test", null, null, 1);
BlockingFakeRelationalNode dataNode = new BlockingFakeRelationalNode(0, data);
dataNode.setReturnPeriod(3);
dataNode.setElements(elems);
dataNode.initialize(context, bufferManager, null);
SortNode sortNode = new SortNode(1);
sortNode.setSortElements(new OrderBy(sortElements).getOrderByItems());
sortNode.setMode(mode);
sortNode.setElements(dataNode.getElements());
sortNode.addChild(dataNode);
sortNode.initialize(context, bufferManager, null);
process(sortNode, expectedRowCount);
}
Aggregations