liutaohua commented on a change in pull request #818: [IOTDB-482] Vectorized
TimeGenerator
URL: https://github.com/apache/incubator-iotdb/pull/818#discussion_r380114309
##########
File path:
tsfile/src/main/java/org/apache/iotdb/tsfile/read/query/timegenerator/node/LeafNode.java
##########
@@ -20,44 +20,28 @@
import java.io.IOException;
import org.apache.iotdb.tsfile.read.common.BatchData;
+import org.apache.iotdb.tsfile.read.common.TimeSeries;
import org.apache.iotdb.tsfile.read.reader.series.AbstractFileSeriesReader;
public class LeafNode implements Node {
private AbstractFileSeriesReader reader;
- private BatchData data = null;
-
- private boolean gotData = false;
+ private BatchData cacheData;
public LeafNode(AbstractFileSeriesReader reader) {
this.reader = reader;
}
@Override
public boolean hasNext() throws IOException {
-
- if (gotData) {
- data.next();
- gotData = false;
- }
-
- if (data == null || !data.hasCurrent()) {
- if (reader.hasNextBatch()) {
- data = reader.nextBatch();
- } else {
- return false;
- }
- }
-
- return data.hasCurrent();
+ return reader.hasNextBatch();
}
@Override
- public long next() {
- long time = data.currentTime();
- gotData = true;
- return time;
+ public TimeSeries next() throws IOException {
Review comment:
that `Node` Interface was rename to `nextTimeColumn`
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services