KazydubB 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_r260782273
##########
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:
I agree that this is not clear why the `-1` is added, so decided to
decrement `maxOffset` value by `1` for the count to be an expected statement
`maxOffset - currentOffset`.
Also did add a method to `RepeatedListReaderImpl` but named it `isEmpty()`
(instead of `isNull()`) as it appears to fit better.
----------------------------------------------------------------
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