vvysotskyi commented on a change in pull request #1896: DRILL-7441: Fix issues 
with fillEmpties, offset vectors
URL: https://github.com/apache/drill/pull/1896#discussion_r346836756
 
 

 ##########
 File path: 
exec/vector/src/main/java/org/apache/drill/exec/vector/complex/AbstractRepeatedMapVector.java
 ##########
 @@ -430,29 +430,35 @@ public boolean isNull(int index) {
   }
 
   public abstract class Mutator implements RepeatedMutator {
+
     @Override
     public void startNewValue(int index) {
       emptyPopulator.populate(index + 1);
-      offsets.getMutator().setSafe(index + 1, 
offsets.getAccessor().get(index));
     }
 
     @Override
     public void setValueCount(int topLevelValueCount) {
-      emptyPopulator.populate(topLevelValueCount);
-      offsets.getMutator().setValueCount(topLevelValueCount == 0 ? 0 : 
topLevelValueCount + 1);
-      int childValueCount = offsets.getAccessor().get(topLevelValueCount);
+      if (topLevelValueCount == 0) {
+        return;
+      }
+      int childValueCount;
+      if (topLevelValueCount == 0) {
 
 Review comment:
   Looks like this code wouldn't be triggered because of the return above.

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


With regards,
Apache Git Services

Reply via email to