Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
Description
Bug Description
Apache IoTDB v0.12 cannot count timeseries and device correctly after introducing template.
Bug Reproduction
When we create a template t1(s1, s2) and then set it to device root.sg1.d1, we expect value 2 produced by count timeseries and value 1 produced by count device. However, the actual result is 0 timeseries and 0 device.
Bug Fix Solution
If a MNode is using template, it should be considered as device and the schema in its template will be considered as timeseries. However, the current code only consider a MeasurementMNode as timeseries and a MNode with MeasurementMNode child as device. Therefore, the method getAllTimeseriesCount and getAllTimeseriesCount in MTree.java should be modified and the judging criteria will be extended with template usage.