Github user manishgupta88 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2663#discussion_r214717788
--- Diff: store/sdk/src/main/java/org/apache/carbondata/sdk/file/Field.java
---
@@ -213,4 +218,58 @@ public String getColumnComment() {
public void setColumnComment(String columnComment) {
this.columnComment = columnComment;
}
+
+ private void initComplexTypeChildren() {
+ if (getDataType().isComplexType()) {
+ StructField subFields = prepareSubFields(getFieldName(),
getDataType());
+ if (DataTypes.isArrayType(getDataType()) ||
DataTypes.isMapType(getDataType())) {
+ children = subFields.getChildren();
+ } else if (DataTypes.isStructType(getDataType())) {
+ children = ((StructType) subFields.getDataType()).getFields();
+ }
+ }
+ }
+
+ /**
+ * prepare sub fields for complex types
+ *
+ * @param fieldName
+ * @param dType
--- End diff --
ok
---