Class JoinPreserveOrderTest

  • public final class JoinPreserveOrderTest
    extends java.lang.Object
    Test validating the order preserving properties of join algorithms in ExtendedEnumerable. The correctness of the join algorithm is not examined by this set of tests.

    To verify that the order of left/right/both input(s) is preserved they must be all ordered by at least one column. The inputs are either sorted on the join or some other column. For the tests to be meaningful the result of the join must not be empty.

    Interesting variants that may affect the join output and thus destroy the order of one or both inputs is when the join column or the sorted column (when join column != sort column) contain nulls or duplicate values.

    In addition, the way that nulls are sorted before the join can also play an important role regarding the order preserving semantics of the join.

    Last but not least, the type of the join (left/right/full/inner/semi/anti) has a major impact on the preservation of order for the various joins.