alpass163 opened a new pull request, #19162:
URL: https://github.com/apache/iotdb/pull/19162

   The exact MAD path has been broken since the UDF was introduced: the four 
getMad overloads (INT32/INT64/FLOAT/DOUBLE) create an empty DoubleArrayList  
and then call set(i, ...) on it. set() requires the index to be smaller
    than the list size, so the first iteration always throws 
IndexOutOfBoundsException. Replace set() with add() and pre-size the list.
    mad(x) now returns the correct value (0.78 for the reported 24-point  
series).


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