use of org.apache.hyracks.dataflow.std.sort.HeapSortRunGenerator in project asterixdb by apache.
the class TopKRunGeneratorTest method testAlreadySortedDataShouldNotGenerateAnyRuns.
@Test
public void testAlreadySortedDataShouldNotGenerateAnyRuns() throws HyracksDataException {
int topK = SORT_FRAME_LIMIT;
IHyracksTaskContext ctx = AbstractRunGeneratorTest.testUtils.create(PAGE_SIZE);
HeapSortRunGenerator sorter = new HeapSortRunGenerator(ctx, SORT_FRAME_LIMIT, topK, SortFields, null, ComparatorFactories, RecordDesc);
testInMemoryOnly(ctx, topK, ORDER.INORDER, sorter);
}
use of org.apache.hyracks.dataflow.std.sort.HeapSortRunGenerator in project asterixdb by apache.
the class TopKRunGeneratorTest method testReverseOrderedDataShouldNotGenerateAnyRuns.
@Test
public void testReverseOrderedDataShouldNotGenerateAnyRuns() throws HyracksDataException {
int topK = 1;
IHyracksTaskContext ctx = AbstractRunGeneratorTest.testUtils.create(PAGE_SIZE);
HeapSortRunGenerator sorter = new HeapSortRunGenerator(ctx, SORT_FRAME_LIMIT, topK, SortFields, null, ComparatorFactories, RecordDesc);
testInMemoryOnly(ctx, topK, ORDER.REVERSE, sorter);
}
Aggregations