You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2019/12/31 01:19:54 UTC
[GitHub] [incubator-iotdb] qiaojialin commented on a change in pull request
#686: Delete the duplicated fields in the BatchData class
qiaojialin commented on a change in pull request #686: Delete the duplicated fields in the BatchData class
URL: https://github.com/apache/incubator-iotdb/pull/686#discussion_r362131746
##########
File path: tsfile/src/main/java/org/apache/iotdb/tsfile/read/common/BatchData.java
##########
@@ -107,16 +93,27 @@ public boolean isEmpty() {
}
public boolean hasCurrent() {
- return curIdx < count;
+ if (readCurListIndex < writeCurListIndex) {
+ return readCurArrayIndex < capacity;
+ }
+ else if (readCurListIndex == writeCurListIndex) {
+ return readCurArrayIndex < writeCurArrayIndex;
Review comment:
should this be <=?
This method could be implemented as : return readCurListIndex <= writeCurListIndex && readCurArrayIndex <= writeCurArrayIndex;
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services