[ 
https://issues.apache.org/jira/browse/DRILL-7268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16860059#comment-16860059
 ] 

ASF GitHub Bot commented on DRILL-7268:
---------------------------------------

vvysotskyi commented on pull request #1805: DRILL-7268: Read Hive array with 
parquet native reader
URL: https://github.com/apache/drill/pull/1805#discussion_r292020286
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet2/DrillParquetGroupConverter.java
 ##########
 @@ -60,53 +62,52 @@
 import org.apache.drill.exec.vector.complex.writer.VarBinaryWriter;
 import org.apache.drill.exec.vector.complex.writer.VarCharWriter;
 import org.apache.drill.exec.vector.complex.writer.VarDecimalWriter;
+import org.apache.drill.shaded.guava.com.google.common.primitives.Ints;
+import org.apache.drill.shaded.guava.com.google.common.primitives.Longs;
 import org.apache.parquet.io.api.Binary;
 import org.apache.parquet.io.api.Converter;
 import org.apache.parquet.io.api.GroupConverter;
 import org.apache.parquet.io.api.PrimitiveConverter;
-import org.apache.parquet.schema.DecimalMetadata;
 import org.apache.parquet.schema.GroupType;
-import org.apache.parquet.schema.MessageType;
+import org.apache.parquet.schema.OriginalType;
 import org.apache.parquet.schema.PrimitiveType;
 import org.apache.parquet.schema.Type;
 import org.apache.parquet.schema.Type.Repetition;
 import org.joda.time.DateTimeConstants;
 
-import org.apache.drill.shaded.guava.com.google.common.collect.Lists;
-
-import io.netty.buffer.DrillBuf;
+import static 
org.apache.drill.exec.store.parquet.ParquetReaderUtility.NanoTimeUtils.getDateTimeValueFromBinary;
 
 public class DrillParquetGroupConverter extends GroupConverter {
 
   private List<Converter> converters;
-  private MapWriter mapWriter;
+  private BaseWriter baseWriter;
   private final OutputMutator mutator;
   private final OptionManager options;
   // See DRILL-4203
   private final ParquetReaderUtility.DateCorruptionStatus 
containsCorruptedDates;
 
-  public DrillParquetGroupConverter(OutputMutator mutator, ComplexWriterImpl 
complexWriter, MessageType schema,
-                                    Collection<SchemaPath> columns, 
OptionManager options,
-                                    ParquetReaderUtility.DateCorruptionStatus 
containsCorruptedDates) {
-    this(mutator, complexWriter.rootAsMap(), schema, columns, options, 
containsCorruptedDates);
-  }
+  /**
+   * Debugging information in form of 
"parent">fieldName[WriterClassName-hashCode()],
+   * where "parent" is parent field in same format.
+   */
+  private final String converterName;
 
   // This function assumes that the fields in the schema parameter are in the 
same order as the fields in the columns parameter. The
   // columns parameter may have fields that are not present in the schema, 
though.
-  public DrillParquetGroupConverter(OutputMutator mutator, MapWriter 
mapWriter, GroupType schema,
+  public DrillParquetGroupConverter(OutputMutator mutator, BaseWriter 
baseWriter, GroupType schema,
                                     Collection<SchemaPath> columns, 
OptionManager options,
-                                    ParquetReaderUtility.DateCorruptionStatus 
containsCorruptedDates) {
-    this.mapWriter = mapWriter;
+                                    ParquetReaderUtility.DateCorruptionStatus 
containsCorruptedDates,
+                                    boolean skipRepeated, String parentName) {
+    this.converterName = parentName + ">" + schema.getName() + "[" + 
baseWriter.getClass().getSimpleName() + "-" + baseWriter.hashCode() + "]";
+    this.baseWriter = baseWriter;
     this.mutator = mutator;
     this.containsCorruptedDates = containsCorruptedDates;
-    converters = Lists.newArrayList();
+    this.converters = new ArrayList<>(1);
 
 Review comment:
   `converters` list is populated in the loop. Is it always has a single 
element? If no, I think it would be better to remove initial capacity.
 
----------------------------------------------------------------
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]


> Read Hive array with parquet native reader
> ------------------------------------------
>
>                 Key: DRILL-7268
>                 URL: https://issues.apache.org/jira/browse/DRILL-7268
>             Project: Apache Drill
>          Issue Type: Sub-task
>            Reporter: Igor Guzenko
>            Assignee: Igor Guzenko
>            Priority: Major
>             Fix For: 1.17.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to