Search in sources :

Example 1 with BlockingFakeRelationalNode

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);
}
Also used : OrderBy(org.teiid.query.sql.lang.OrderBy) BlockingFakeRelationalNode(org.teiid.query.processor.relational.BlockingFakeRelationalNode) CommandContext(org.teiid.query.util.CommandContext) SortNode(org.teiid.query.processor.relational.SortNode)

Aggregations

BlockingFakeRelationalNode (org.teiid.query.processor.relational.BlockingFakeRelationalNode)1 SortNode (org.teiid.query.processor.relational.SortNode)1 OrderBy (org.teiid.query.sql.lang.OrderBy)1 CommandContext (org.teiid.query.util.CommandContext)1