public WorkProcessor<Page> merge(List<Type> keyTypes, List<Type> allTypes, List<WorkProcessor<Page>> pages, DriverYieldSignal driverYieldSignal)
    {
        return merge(keyTypes, null, allTypes, pages, driverYieldSignal);
    }
@Test
    public void testBinaryMergeIteratorOverPageWithDifferentHashes()
    {
        Page page = rowPagesBuilder(BIGINT)
                .row(42)
                .row(42)
                .row(52)
                .row(60)
                .build().get(0);

        WorkProcessor<Page> mergedPages = new MergeHashSort(newSimpleAggregatedMemoryContext()).merge(
                ImmutableList.of(BIGINT),
                ImmutableList.of(BIGINT),
                ImmutableList.of(ImmutableList.of(page).iterator()).stream()
                        .map(WorkProcessor::fromIterator)
                        .collect(toImmutableList()),
                new DriverYieldSignal());

        assertTrue(mergedPages.process());
        Page resultPage = mergedPages.getResult();
        assertEquals(resultPage.getPositionCount(), 4);
        assertEquals(resultPage.getBlock(0).getLong(0), 42);
        assertEquals(resultPage.getBlock(0).getLong(1), 42);
        assertEquals(resultPage.getBlock(0).getLong(2), 52);
        assertEquals(resultPage.getBlock(0).getLong(3), 60);

        assertFinishes(mergedPages);
    }