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 2019/07/17 06:11:28 UTC
[GitHub] [incubator-iotdb] LeiRui opened a new pull request #253: Refactor
the reader package for readability (#241)
LeiRui opened a new pull request #253: Refactor the reader package for readability (#241)
URL: https://github.com/apache/incubator-iotdb/pull/253
**(cherry-pick this commit from rel/0.8 to master)**
* Refactor the reader package for readability
The former code in the org.apache.iotdb.db.query.reader package is
somewhat diffcult to read.
Through this refactor, two main tasks are completed:
* the three levels of readers are made explicit: chunkRelated <
resoureRelated < seriesReader
* the two interfaces for creating the unsequence readers in
SeriesReaderFactoryImpl are removed. Instead, two classes UnseqResourceMergeReader
and UnseqResourceReaderByTimestamp are used. This change brings two
benefits: a) SeriesReaderFactoryImpl is thus focused purely on the
creation of series readers and acts as a middleman between query
executor and data reader.b) The classes for sequence and unsequence
classes are symmetric finally.
The future work includes further removing duplicated code and writing
better annotations.
* Deprecate the SeriesReaderFactoryImpl
The former code creates the three series related readers (
SeriesReaderWithoutValueFilter, SeriesReaderWithValueFilter and
SeriesReaderByTimestamp) by the help of SeriesReaderFactoryImpl.
However, thanks to the latest refactor of the reader package, it becomes
clear that the creation tasks can be handed over to the constructors
of the three series reader classes respectively. This change brings about
two benefits: 1) the role of the three series readers are more
clear and controllable since now the inputs of their constructors are not
pre-created readers but the raw resouces. 2) the SeriesReaderFactoryImpl
now can be removed or changed to perform other tasks such as code
deduplication.
update
* Add JAVA annotations and improve related tests.
reformat license
* fix the bug in getValueInTimestamp of SeqResourceReaderByTimestamp; further split the subpackage chunkRelated into two subpackages chunkRelated and fileRelated.
* unsealed sequence TsFile's endTimeMap can also be used in constructNextReader of SeqResourceReaderByTimestamp to speed up
* add resource filter step in the resource related reader construction process
* add more annotations for isTsFileNotSatisfied and constructNextReader
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services