@Override
  public int compareTo(ColumnDescriptor o) {
    int length = path.length < o.path.length ? path.length : o.path.length;
    for (int i = 0; i < length; i++) {
      int compareTo = path[i].compareTo(o.path[i]);
      if (compareTo != 0) {
        return compareTo;
      }
    }
    return path.length - o.path.length;
  }
@Test
  public void testComparesTo() throws Exception {
    assertEquals(column("a").compareTo(column("a")), 0);
    assertEquals(column("a", "b").compareTo(column("a", "b")), 0);

    assertEquals(column("a").compareTo(column("b")), -1);
    assertEquals(column("b").compareTo(column("a")), 1);
    assertEquals(column("a", "a").compareTo(column("a", "b")), -1);
    assertEquals(column("b", "a").compareTo(column("a", "a")), 1);

    assertEquals(column("a").compareTo(column("a", "b")), -1);
    assertEquals(column("b").compareTo(column("a", "b")), 1);

    assertEquals(column("a", "b").compareTo(column("a")), 1);
    assertEquals(column("a", "b").compareTo(column("b")), -1);

    assertEquals(column("").compareTo(column("")), 0);
    assertEquals(column("").compareTo(column("a")), -1);
    assertEquals(column("a").compareTo(column("")), 1);
  }