arina-ielchiieva commented on a change in pull request #1844: DRILL-7326: 
Support repeated lists for CTAS parquet format
URL: https://github.com/apache/drill/pull/1844#discussion_r315588033
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetRecordWriter.java
 ##########
 @@ -302,6 +312,32 @@ private Type getType(MaterializedField field) {
     }
   }
 
+  private void addElementType(ListBuilder<GroupType> listBuilder, 
MaterializedField elementField) {
+    if (elementField.getDataMode() == DataMode.REPEATED) {
+      MaterializedField child2 = elementField.getChildren().iterator().next();
+      ListBuilder<GroupType> inner = 
org.apache.parquet.schema.Types.requiredList();
+      addElementType(inner, child2);
+      listBuilder.setElementType(inner.named("element"));
+    } else {
+      Type element = getType(elementField);
+      // rename element type before adding to listBuilder
 
 Review comment:
   Why? Add explanation to the comment.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to