Caideyipi commented on code in PR #18589:
URL: https://github.com/apache/iotdb/pull/18589#discussion_r3964056108


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/fill/filter/FixedIntervalFillFilter.java:
##########
@@ -34,6 +36,7 @@ public FixedIntervalFillFilter(long timeInterval) {
   public boolean needFill(long time, long previousTime) {
     // the reason that we use Math.abs is that we may use order by time desc 
which will cause
     // previousTime is larger than time
-    return Math.abs(time - previousTime) <= timeInterval;
+    return timeDifferenceAsDouble(time, previousTime) <= timeInterval
+        && timeDifferenceAsDouble(previousTime, time) <= timeInterval;

Review Comment:
   Fixed in 7b3c9a2208f. FixedIntervalFillFilter now delegates to the exact 
unsigned-distance comparison used by DownSamplingTimeUtils, so the threshold 
remains exact even above 2^53 and across long subtraction overflow.



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