diff --git a/java/tsfile/src/main/java/org/apache/tsfile/write/writer/RestorableTsFileIOWriter.java b/java/tsfile/src/main/java/org/apache/tsfile/write/writer/RestorableTsFileIOWriter.java index 5fb2eb6c2..e01b741ca 100644 --- a/java/tsfile/src/main/java/org/apache/tsfile/write/writer/RestorableTsFileIOWriter.java +++ b/java/tsfile/src/main/java/org/apache/tsfile/write/writer/RestorableTsFileIOWriter.java @@ -193,10 +193,7 @@ public List getVisibleMetadataList( if (metadatasForQuery.containsKey(deviceId) && metadatasForQuery.get(deviceId).containsKey(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())) { + if (dataType == null || dataType.isCompatible(chunkMetaData.getDataType())) { chunkMetadataList.add(chunkMetaData); } }