Github user StevenMPhillips commented on a diff in the pull request:

    https://github.com/apache/drill/pull/207#discussion_r42285176
  
    --- Diff: protocol/src/main/protobuf/Types.proto ---
    @@ -73,6 +74,7 @@ message MajorType {
       optional int32 precision = 4; // used for decimal types
       optional int32 scale = 5; // used for decimal types
       optional int32 timeZone = 6; // used by TimeStamp type
    +  repeated MinorType sub_type = 7; // used by Union type
    --- End diff --
    
    We basically don't allow a non-leaf/non-root node of an expression tree to 
have a complex type. Expressions where an intermediate node are complex, the 
expression is split apart into separate operators. So we only care about the 
subtypes of a map or list vector when reading from the vector.
    
    In the case of a Union vector, it is possible that intermediate nodes might 
have Union type. We pass the possible subtypes up the tree so that the code 
generated only includes the code needed for the specific types that are 
present, rather than having to generate code for every type at every node.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to