vdiravka commented on a change in pull request #1641: DRILL-4858: 
REPEATED_COUNT on an array of maps and an array of arrays is not implemented
URL: https://github.com/apache/drill/pull/1641#discussion_r258589990
 
 

 ##########
 File path: 
exec/vector/src/main/java/org/apache/drill/exec/vector/complex/impl/RepeatedListReaderImpl.java
 ##########
 @@ -80,7 +79,10 @@ public void reset() {
 
   @Override
   public int size() {
-    return maxOffset - currentOffset;
+    if (currentOffset == NO_VALUES) {
+      return 0;
+    }
+    return maxOffset - currentOffset - 1;
 
 Review comment:
   @KazydubB It will be good to have it for consistency with 
`ReapetedMapReaderImpl`.
   You can use parentheses. 
   `return isNull() ? 0 : (maxOffset - currentOffset - 1);`
   The final decision is yours
   
   @ihuzenko Good note. I think it will be good to have a comment, why `-1` is 
need. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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