ihuzenko 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_r257233699
##########
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:
In my opinion usage ternary or full conditional construct doesn't impact
code readability here. I'm confused by unclear naming of the fields and
necessity to use 'magic number' along with the fields. @KazydubB could you
please rename or provide descriptive javadocs and constant for 1 to make
offsets usage look clear ?
----------------------------------------------------------------
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