Github user jacques-n commented on a diff in the pull request:

    https://github.com/apache/drill/pull/207#discussion_r43471006
  
    --- Diff: exec/java-exec/src/main/codegen/templates/MapWriters.java ---
    @@ -70,10 +79,15 @@ public MaterializedField getField() {
       @Override
       public MapWriter map(String name) {
           FieldWriter writer = fields.get(name.toLowerCase());
    -    if(writer == null) {
    -      int vectorCount = container.size();
    -      MapVector vector = container.addOrGet(name, MapVector.TYPE, 
MapVector.class);
    -      writer = new SingleMapWriter(vector, this);
    +    if(writer == null){
    +      int vectorCount=container.size();
    +      if(!unionEnabled || unionInternalMap){
    +        MapVector 
vector=container.addOrGet(name,MapVector.TYPE,MapVector.class);
    --- End diff --
    
    let's pull out the common expression between these two cases


---
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