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_r315588397
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetRecordWriter.java
 ##########
 @@ -423,6 +459,34 @@ public void writeField() throws IOException {
     }
   }
 
+  @Override
+  public FieldConverter getNewRepeatedListConverter(int fieldId, String 
fieldName, FieldReader reader) {
+    return new RepeatedListParquetConverter(fieldId, fieldName, reader);
+  }
+
+  public class RepeatedListParquetConverter extends FieldConverter {
+    private final FieldConverter converter;
+
+    RepeatedListParquetConverter(int fieldId, String fieldName, FieldReader 
reader) {
+      super(fieldId, fieldName, reader);
+      converter = 
EventBasedRecordWriter.getConverter(ParquetRecordWriter.this, 0, "", 
reader.reader());
+    }
+
+    @Override
+    public void writeField() throws IOException {
+      consumer.startField(fieldName, fieldId);
+      consumer.startField("list", 0);
 
 Review comment:
   Should we use constant?

----------------------------------------------------------------
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