@Override
    public String toSql(int depth) {
        if (depth >= MAX_NESTING_DEPTH) {
            return "struct<...>";
        }
        ArrayList<String> fieldsSql = Lists.newArrayList();
        for (StructField f : fields) {
            fieldsSql.add(f.toSql(depth + 1, true));
        }
        return String.format("struct<%s>", Joiner.on(", ").join(fieldsSql));
    }
@Test
    public void testUnnamedStruct() {
        StructType type = new StructType(Lists.newArrayList(Type.INT, Type.DATETIME));
        Assert.assertEquals("struct<col1 int(11), col2 datetime>", type.toSql());
    }