周沛辰 created IOTDB-2582:
--------------------------
Summary: Enable reading chunk by timestamp
Key: IOTDB-2582
URL: https://issues.apache.org/jira/browse/IOTDB-2582
Project: Apache IoTDB
Issue Type: Improvement
Reporter: 周沛辰
Assignee: 周沛辰
Fix For: 0.13.0
Currently, we use ChunkReaderByTimestamp by calling its contructor and then
setting the {{{}currentTimestamp, which makes the class invalid and does not
accelerate queries{}}}.
*To Reproduce*
Steps to reproduce the behavior:
# Import {{org.apache.iotdb.tsfile.read.reader.chunk.ChunkReaderByTimestamp}}
and its super class
{{{}org.apache.iotdb.tsfile.read.reader.chunk.ChunkReader{}}}.
# Read or build one Chunk with a few data
# Construct a ChunkReader, a ChunkReaderByTimestamp, and set the
{{currentTimestamp}} of the latter one with interface {{public void
setCurrentTimestamp(long currentTimestamp)}}
# Run with debugger and watch the member variable {{private List<IPageReader>
pageReaderList}} of these two instances. They are always the same.
# Or fetch data by {{while (reader.hasNextSatisfiedPage()) \{BatchData
batchData = reader.nextPageData()}}} and print all points. They are always the
same, too.
*Solution*
Therefore, we remove the ChunkReaderByTimestamp , instead, we add a constructor
in ChunkReader to implement reading chunk by timestamp, which is
{quote}public ChunkReader(Chunk chunk, Filter filter, long currentTimestamp)
{quote}
So does AlignedChunkReaderByTimestamp.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)