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:
[ ] I have added test cases for my bug fix or my new feature
[ ] This pr will affect users' behaviors
[ ] This pr needs user documentation (for new or modified features or behaviors)
[ ] I have added documentation for my new feature or new function
…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
Problem Summary(Required) :
Checklist: