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 2022/05/04 12:52:05 UTC
[GitHub] [iotdb] Alima777 commented on a diff in pull request #5792: [IOTDB-3080] Implementation of AlignedSeriesScanOperator
Alima777 commented on code in PR #5792:
URL: https://github.com/apache/iotdb/pull/5792#discussion_r864780565
##########
tsfile/src/main/java/org/apache/iotdb/tsfile/read/common/block/TsBlock.java:
##########
@@ -357,52 +357,94 @@ public Object[] next() {
}
}
- private class AlignedTsBlockIterator extends TsBlockSingleColumnIterator {
+ private class TsBlockAlignedRowIterator implements IPointReader, IBatchDataIterator {
- private final int subIndex;
+ private int rowIndex;
- private AlignedTsBlockIterator(int index, int subIndex) {
- super(index);
- this.subIndex = subIndex;
+ public TsBlockAlignedRowIterator(int rowIndex) {
+ this.rowIndex = rowIndex;
}
@Override
public boolean hasNext() {
- while (super.hasNext() && currentValue() == null) {
- super.next();
- }
- return super.hasNext();
+ return rowIndex < positionCount;
}
@Override
public boolean hasNext(long minBound, long maxBound) {
- while (super.hasNext() && currentValue() == null) {
+ while (hasNext()) {
if (currentTime() < minBound || currentTime() >= maxBound) {
break;
}
Review Comment:
wrong?
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org