jt2594838 commented on code in PR #15010:
URL: https://github.com/apache/iotdb/pull/15010#discussion_r1979151405


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/subtask/FastCompactionPerformerSubTask.java:
##########
@@ -101,6 +104,32 @@ public FastCompactionPerformerSubTask(
     this.ignoreAllNullRows = true;
   }
 
+  public FastCompactionPerformerSubTask(
+      AbstractCompactionWriter compactionWriter,
+      Map<String, Map<TsFileResource, Pair<Long, Long>>> 
timeseriesMetadataOffsetMap,
+      Map<String, TSDataType> dataTypeMap,

Review Comment:
   dataTypeMap -> measurementNameDataTypeMap



##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/performer/impl/FastCompactionPerformer.java:
##########
@@ -239,6 +240,8 @@ private void compactNonAlignedSeries(
     Map<String, Map<TsFileResource, Pair<Long, Long>>> 
timeseriesMetadataOffsetMap =
         deviceIterator.getTimeseriesMetadataOffsetOfCurrentDevice();
 
+    Map<String, TSDataType> measurementDataTypeMap = 
deviceIterator.getDataTypeOfCurrentDevice();

Review Comment:
   Can these two methods be merged into one? Otherwise, the metadata is 
traversed twice, which may affect the efficiency.
   Like 
   ```
   Map<String, CompactionSeriesContext> timeseriesMetadataOffsetMap =
           deviceIterator.getCompactionSeriesContextOfCurrentDevice();
   class CompactionSeriesContext {
       Map<TsFileResource, Pair<Long, Long>> fileTimeseriesMetdataOffsetMap;
       TSDataType finalType;
   }
   ```
   



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