Github user paul-rogers commented on a diff in the pull request:

    https://github.com/apache/drill/pull/1060#discussion_r158197926
  
    --- Diff: exec/vector/src/main/codegen/templates/NullableValueVectors.java 
---
    @@ -296,26 +655,75 @@ public void transferTo(Nullable${minor.class}Vector 
target){
       }
     
       public void splitAndTransferTo(int startIndex, int length, 
Nullable${minor.class}Vector target) {
    +    <#if type.major == "VarLen" && minor.class == "VarChar">
    +    if (isDuplicateValsOnly()) {
    +      if (!target.isDuplicateValsOnly() || startIndex > 0) {
    +        throw new UnsupportedOperationException();
    +      }
    +      target.logicalNumValues     = logicalNumValues;
    +      target.logicalValueCapacity = logicalValueCapacity;
    +      startIndex                  = 0;
    +      length                      = 1;
    +    }
    +    </#if>
         bits.splitAndTransferTo(startIndex, length, target.bits);
         values.splitAndTransferTo(startIndex, length, target.values);
         <#if type.major == "VarLen">
         target.mutator.lastSet = length - 1;
         </#if>
       }
     
    +  public ${minor.class}Vector convertToRequiredVector(){
    --- End diff --
    
    Is this semantically valid?


---

Reply via email to