You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by GitBox <gi...@apache.org> on 2019/01/28 13:30:26 UTC

[GitHub] arina-ielchiieva commented on a change in pull request #1623: DRILL-7006: Add type conversion to row writers

arina-ielchiieva commented on a change in pull request #1623: DRILL-7006: Add type conversion to row writers
URL: https://github.com/apache/drill/pull/1623#discussion_r251413842
 
 

 ##########
 File path: exec/vector/src/main/java/org/apache/drill/exec/vector/accessor/writer/ScalarArrayWriter.java
 ##########
 @@ -60,13 +60,17 @@
     public final void nextElement() { next(); }
   }
 
-  private final BaseScalarWriter elementWriter;
+  private final ConcreteWriter elementWriter;
 
   public ScalarArrayWriter(ColumnMetadata schema,
       RepeatedValueVector vector, BaseScalarWriter elementWriter) {
     super(schema, vector.getOffsetVector(),
         new ScalarObjectWriter(elementWriter));
-    this.elementWriter = elementWriter;
+
+    // Save the writer from the scalar object writer created above
+    // which may have wrapped the element writer in a type convertor.
+
+    this.elementWriter = (ConcreteWriter) elementObjWriter.scalar();
 
 Review comment:
   Is it ok to do the cast here?

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


With regards,
Apache Git Services