qiaojialin commented on a change in pull request #756: add new byTimestampReader
URL: https://github.com/apache/incubator-iotdb/pull/756#discussion_r369006543
 
 

 ##########
 File path: 
server/src/main/java/org/apache/iotdb/db/query/reader/chunkRelated/MemChunkReaderByTimestamp.java
 ##########
 @@ -19,31 +19,25 @@
 package org.apache.iotdb.db.query.reader.chunkRelated;
 
 import java.io.IOException;
-import java.util.List;
 import org.apache.iotdb.db.engine.querycontext.ReadOnlyMemChunk;
 import org.apache.iotdb.db.query.reader.IReaderByTimestamp;
-import 
org.apache.iotdb.db.query.reader.fileRelated.UnSealedTsFileReaderByTimestamp;
 import org.apache.iotdb.db.query.reader.universal.PriorityMergeReader;
 import org.apache.iotdb.tsfile.read.TimeValuePair;
 
 /**
  * To read data in memory by timestamp, this class implements an interface 
{@link
  * IReaderByTimestamp} based on the data source {@link ReadOnlyMemChunk}.
  * <p>
- * This class is used in {@link UnSealedTsFileReaderByTimestamp} and {@link
- * 
org.apache.iotdb.db.query.reader.resourceRelated.UnseqResourceReaderByTimestamp}.
  */
 public class MemChunkReaderByTimestamp implements IReaderByTimestamp {
 
   private PriorityMergeReader timeValuePairIterator;
   private boolean hasCachedTimeValuePair;
   private TimeValuePair cachedTimeValuePair;
 
-  public MemChunkReaderByTimestamp(List<ReadOnlyMemChunk> readableChunk) 
throws IOException {
+  public MemChunkReaderByTimestamp(ReadOnlyMemChunk memChunk) throws 
IOException {
     timeValuePairIterator = new PriorityMergeReader();
-    for (ReadOnlyMemChunk memChunk : readableChunk) {
-      timeValuePairIterator.addReader(memChunk.getIterator(), 
memChunk.getVersion());
-    }
+    timeValuePairIterator.addReader(memChunk.getIterator(), 
memChunk.getVersion());
 
 Review comment:
   no need to use a  prioritemergereader

----------------------------------------------------------------
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

Reply via email to