StarRocks / starrocks-connector-for-apache-spark

Apache License 2.0
36 stars 53 forks source link

[Feature] jsonConvert supports data structure parsing of nested struc… #118

Closed wypzj closed 2 months ago

wypzj commented 2 months ago

…tType types

What type of PR is this:

Which issues of this PR fixes :

To synchronize spark data, json convert supports data structure parsing of nested structType types

   private final static StructType PERSON_TYPE = new StructType(new StructField[]{
            new StructField("name", DataTypes.StringType, false, Metadata.empty()),
            new StructField("age", DataTypes.LongType, true, Metadata.empty())

    });
    private final static StructType STRUCT_TYPE1 = new StructType(new StructField[]{
            new StructField("id", DataTypes.LongType, false, Metadata.empty()),
            new StructField("person", PERSON_TYPE, true, Metadata.empty())    });

Problem Summary(Required) :

Checklist: