public static List<List<Expr>> candidateOfPartitionByExprs(List<List<Expr>> partitionByExprs) {
        if (partitionByExprs.isEmpty()) {
            return Lists.newArrayList();
        }
        PermutationGenerator generator = new PermutationGenerator<Expr>(partitionByExprs);
        int totalCount = 0;
        List<List<Expr>> candidates = Lists.newArrayList();
        while (generator.hasNext() && totalCount < 8) {
            candidates.add(generator.next());
            totalCount++;
        }
        return candidates;
    }
@Test
    public void testPermutaionsOfPartitionByExprs1() throws Exception {
        List<List<Expr>> slotRefs = createSlotRefArray(2, 3);
        for (List<Expr> refs: slotRefs) {
            System.out.println(slotRefsToInt(refs));
        }
        List<List<Expr>> newSlotRefs = PlanNode.candidateOfPartitionByExprs(slotRefs);
        Assert.assertTrue(newSlotRefs.size() == 8);
        for (List<Expr> candidates: newSlotRefs) {
            System.out.println(slotRefsToInt(candidates));
        }
        int k = 0;
        for (int i = 0; i < 3; i++) {
            for (int j = 3; j < 6; j++) {
                if (k >= 8) break;
                Assert.assertTrue(slotRefsEqualTo(newSlotRefs.get(k++), Arrays.asList(i, j)));
            }
        }
    }