The main idea is like IndexMergerTest::testNonLexicographicDimOrderMerge()
If we have 2 indexes:
one have dimension order like "d3", "d1", "d2"
the other have dimension order like "d2", "d1", "d3"
Note in IncrementalIndex, the "facts" are sorted based on its own dimension order.
But when we merge these two indexes, we must determine the merged dimension order, which we can not found one to make these two indexes happy.
So when we merge rows from these two indexes, even if we have changed the dimension order to the new merged order, but the order inside each index are different with the outer merge order.
The main idea is like IndexMergerTest::testNonLexicographicDimOrderMerge()
If we have 2 indexes:
one have dimension order like "d3", "d1", "d2"
the other have dimension order like "d2", "d1", "d3"
Note in IncrementalIndex, the "facts" are sorted based on its own dimension order.
But when we merge these two indexes, we must determine the merged dimension order, which we can not found one to make these two indexes happy.
So when we merge rows from these two indexes, even if we have changed the dimension order to the new merged order, but the order inside each index are different with the outer merge order.