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

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

paul-rogers commented on pull request #2018: DRILL-7633: Fixes for union and 
repeated list accessors
URL: https://github.com/apache/drill/pull/2018#discussion_r391431754
 
 

 ##########
 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:
   Nicely done! We discussed the problem with `UNION` a while back and realized 
it was a mess. Now I gotta deal with it...
   
   The `typeString()` version is used, I presume, in a provided schema. Correct?
   
   If so, then then the base class implementation is fine, the output will be 
just `UNION`. If we think of Drill's `UNION` as like a Visual Basic or 
PostgreSQL variant (or a Python variable), then the `UNION` type is sufficient: 
a `UNION` can hold anything; no need to restrict what it might or might not 
hold.
 
----------------------------------------------------------------
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]


> Fixes for union and repeated list accessors
> -------------------------------------------
>
>                 Key: DRILL-7633
>                 URL: https://issues.apache.org/jira/browse/DRILL-7633
>             Project: Apache Drill
>          Issue Type: Improvement
>    Affects Versions: 1.17.0
>            Reporter: Paul Rogers
>            Assignee: Paul Rogers
>            Priority: Minor
>             Fix For: 1.18.0
>
>
> Minor fixes for repeated list and Union type support in column accessors



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to