You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by "DanielWang2035 (via GitHub)" <gi...@apache.org> on 2025/04/23 06:00:44 UTC

Re: [PR] Load: Enhanced the table auto-creation logic [iotdb]

DanielWang2035 commented on code in PR #15265:
URL: https://github.com/apache/iotdb/pull/15265#discussion_r2055305871


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/ModificationUtils.java:
##########
@@ -404,16 +403,18 @@ public static List<ModEntry> sortAndMerge(List<ModEntry> modifications) {
   }
 
   public static boolean isDeviceDeletedByMods(
-      Collection<ModEntry> currentModifications, ITimeIndex currentTimeIndex, IDeviceID device)
+      final Collection<ModEntry> currentModifications,
+      final ITimeIndex currentTimeIndex,
+      final IDeviceID device)
       throws IllegalPathException {
-    if (currentTimeIndex == null) {
-      return false;
-    }
-    Optional<Long> startTime = currentTimeIndex.getStartTime(device);
-    Optional<Long> endTime = currentTimeIndex.getEndTime(device);
-    if (startTime.isPresent() && endTime.isPresent()) {
-      return isAllDeletedByMods(currentModifications, device, startTime.get(), endTime.get());
-    }
-    return false;
+    return isAllDeletedByMods(

Review Comment:
   Will the logic be different from the former version when either startTime or endTime is not present?



-- 
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: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org