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


##########
java/tsfile/src/main/java/org/apache/tsfile/write/writer/RestorableTsFileIOWriter.java:
##########
@@ -186,12 +185,26 @@ public List<ChunkMetadata> getVisibleMetadataList(
     List<ChunkMetadata> chunkMetadataList = new ArrayList<>();
     if (metadatasForQuery.containsKey(deviceId)
         && metadatasForQuery.get(deviceId).containsKey(measurementId)) {
-      for (IChunkMetadata chunkMetaData : 
metadatasForQuery.get(deviceId).get(measurementId)) {
+      for (ChunkMetadata chunkMetaData : 
metadatasForQuery.get(deviceId).get(measurementId)) {
         // filter: if a device'measurement is defined as float type, and data 
has been persistent.
         // Then someone deletes the timeseries and recreate it with Int type. 
We have to ignore
         // all the stale data.
         if (dataType == null || dataType.equals(chunkMetaData.getDataType())) {
-          chunkMetadataList.add((ChunkMetadata) chunkMetaData);
+          chunkMetadataList.add(chunkMetaData);
+        }
+      }
+    }
+    return chunkMetadataList;
+  }
+
+  public List<ChunkMetadata> getVisibleMetadataList(IDeviceID deviceId, 
TSDataType dataType) {

Review Comment:
   ```suggestion
     public List<List<ChunkMetadata>> getVisibleMetadataList(IDeviceID 
deviceId, TSDataType dataType) {
   ```



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