paul-rogers 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_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: us...@infra.apache.org With regards, Apache Git Services