JackieTien97 commented on code in PR #816:
URL: https://github.com/apache/tsfile/pull/816#discussion_r3251951260


##########
python/tsfile/dataset/reader.py:
##########
@@ -90,20 +99,24 @@ def __del__(self):
     def catalog(self) -> MetadataCatalog:
         return self._catalog
 
+    @property
+    def model_kind(self) -> str:
+        return self._model_kind
+
     @property
     def series_paths(self) -> List[str]:
         return list(self.iter_series_paths())
 
     @property
     def series_count(self) -> int:

Review Comment:
   `MetadataCatalog.series_count` (metadata.py:148) still computes the 
cross-product of all `(device, field)` combos, but the reader's `series_count` 
property (line 111) now uses `len(series_stats_by_ref)` which counts only 
physically-present series.
   
   For sparse schemas these two diverge. Tests at `test_tsfile_dataset.py:688` 
and `:789` still call `reader.catalog.series_count` and happen to pass because 
those fixtures are fully dense, but this is a latent inconsistency.
   
   Consider either: (a) updating `MetadataCatalog.series_count` to also return 
`len(self.series_stats_by_ref)`, or (b) deprecating it in favor of the reader 
property.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to