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


##########
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/udf/builtin/UDTFEqualSizeBucketOutlierSample.java:
##########
@@ -354,14 +356,12 @@ public void outlierSampleLong(RowWindow rowWindow, 
PointCollector collector)
         currentValue = rowWindow.getRow(i).getLong(0);
         nextValue = rowWindow.getRow(i + 1).getLong(0);
 
-        x1 = currentTime - lastTime;
-        x2 = nextTime - currentTime;
-        y1 = currentValue - lastValue;
-        y2 = nextValue - currentValue;
+        x1 = timeDifferenceAsDouble(currentTime, lastTime);
+        x2 = timeDifferenceAsDouble(nextTime, currentTime);
+        y1 = (double) currentValue - (double) lastValue;
+        y2 = (double) nextValue - (double) currentValue;

Review Comment:
   Fixed in 7b3c9a2208f. INT64 deltas now use 
timeDifferenceAsDouble(currentValue, lastValue) before the floating-point 
cosine calculation, and the same correction is applied to the INT64 prenextdis 
path. This preserves small differences around 1L << 60.



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