Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
qiaojialin committed Feb 28, 2020
1 parent 3fb340e commit 40893c4
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -20,13 +20,14 @@

import org.apache.iotdb.tsfile.read.TimeValuePair;
import org.apache.iotdb.tsfile.read.common.BatchData;

import java.io.IOException;

public class BatchDataIterator implements IPointReader {

private BatchData batchData;

private TimeValuePair currentTimeValue;

public BatchDataIterator(BatchData batchData) {
this.batchData = batchData;
}
Expand All @@ -39,13 +40,14 @@ public boolean hasNextTimeValuePair() {
@Override
public TimeValuePair nextTimeValuePair() {
TimeValuePair timeValuePair = new TimeValuePair(batchData.currentTime(), batchData.currentTsPrimitiveType());
currentTimeValue = timeValuePair;
batchData.next();
return timeValuePair;
}

@Override
public TimeValuePair currentTimeValuePair() {
return new TimeValuePair(batchData.currentTime(), batchData.currentTsPrimitiveType());
return currentTimeValue;
}

@Override
Expand Down

0 comments on commit 40893c4

Please sign in to comment.