arina-ielchiieva commented on a change in pull request #2018: DRILL-7633: Fixes 
for union and repeated list accessors
URL: https://github.com/apache/drill/pull/2018#discussion_r390202680
 
 

 ##########
 File path: 
exec/vector/src/main/java/org/apache/drill/exec/record/metadata/VariantColumnMetadata.java
 ##########
 @@ -96,11 +134,13 @@ public StructureType structureType() {
   public boolean isVariant() { return true; }
 
   @Override
-  public boolean isArray() { return type() == MinorType.LIST; }
+  public boolean isArray() {
+    return super.isArray() || type() == MinorType.LIST;
+  }
 
   @Override
   public ColumnMetadata cloneEmpty() {
-    return new VariantColumnMetadata(name, type, variantSchema.cloneEmpty());
+    return new VariantColumnMetadata(name, type, mode, new VariantSchema());
 
 Review comment:
   Also this class should override `public String typeString()` which is used 
during ser / de.
   For example, `UNION<INT, VARCHAR, BOOLEAN>`. Not sure how to describe LIST 
though...

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to