Caideyipi commented on PR #17871: URL: https://github.com/apache/iotdb/pull/17871#issuecomment-6846746464
### Independent re-review: fixes completed, Draft retained Completed one review round of the full diff and relevant context, including MAD merge/isNull, sampling Row reuse and INT64 precision, DWT levels, Histogram/MinMax extremes, Spline timestamps/coordinates/endpoints, and test fixtures. - Reviewed head: `a8e5d9e1f70c240a74c67a7f9135cc5bbc3fb25b` - Comparison base: `cca1dbbde6d0dffa38495c92c92a48b2626d2f99` - Final local commit: `c1b81b14a3041e5cdb8cce797ee5cd3e9c835d1f` - Confirmed source branch and PR head: `c1b81b14a3041e5cdb8cce797ee5cd3e9c835d1f` Six behavior issues and one test-fixture issue were found and fixed: 1. [Spline output coordinates](https://github.com/Caideyipi/iotdb/blob/c1b81b14a3041e5cdb8cce797ee5cd3e9c835d1f/library-udf/src/main/java/org/apache/iotdb/library/dprofile/UDTFSpline.java#L120): for `t=y=0..4`, `points=4`, rounded timestamps `[0,1,3,4]` previously carried values `[0,1.3333,2.6667,4]`. Interpolation now evaluates at the emitted timestamps. 2. [Spline terminal coordinate collisions](https://github.com/Caideyipi/iotdb/blob/c1b81b14a3041e5cdb8cce797ee5cd3e9c835d1f/library-udf/src/main/java/org/apache/iotdb/library/dprofile/UDTFSpline.java#L108): timestamps near `Long.MAX_VALUE` can share a double coordinate across the full long range. The final input value is now retained instead of being discarded. 3. [AR small-amplitude inputs](https://github.com/Caideyipi/iotdb/blob/c1b81b14a3041e5cdb8cce797ee5cd3e9c835d1f/library-udf/src/main/java/org/apache/iotdb/library/dlearn/UDTFAR.java#L143): the absolute epsilon cutoff suppressed valid coefficients, e.g. `[1e-8,2e-8,3e-8]` should yield `6/7`. The guard now rejects only zero or non-finite denominators. 4. [DTW pattern validation](https://github.com/Caideyipi/iotdb/blob/c1b81b14a3041e5cdb8cce797ee5cd3e9c835d1f/library-udf/src/main/java/org/apache/iotdb/library/match/UDAFDTWMatch.java#L213): comma-only patterns could pass validation because `split` discarded empty elements. Empty elements, including trailing commas, are now rejected. 5. [Histogram boundaries](https://github.com/Caideyipi/iotdb/blob/c1b81b14a3041e5cdb8cce797ee5cd3e9c835d1f/library-udf/src/main/java/org/apache/iotdb/library/dprofile/UDTFHistogram.java#L88): with `[0,100]` and 100 buckets, input `29` could fall into bucket `28`. Division by bucket width now preserves this exact boundary, with the existing extreme-range scaling and a fallback when width underflows. 6. [Moving-average recovery](https://github.com/Caideyipi/iotdb/blob/c1b81b14a3041e5cdb8cce797ee5cd3e9c835d1f/library-udf/src/main/java/org/apache/iotdb/library/dprofile/UDTFMvAvg.java#L76): an overflowing sum permanently poisoned later finite windows. A non-finite sum is now rebuilt from the current window; non-finite results are skipped and subsequent finite windows recover. 7. [RowWindow fixture](https://github.com/Caideyipi/iotdb/blob/c1b81b14a3041e5cdb8cce797ee5cd3e9c835d1f/library-udf/src/test/java/org/apache/iotdb/library/UDFWindowAndQueueTest.java#L3013): `getRow()` returned independent objects despite the intended reuse coverage. It now exposes a shared mutable Row and actual data types, and sampling tests explicitly assert object reuse. Validation: the six behavior regressions reproduced their failures before the production fixes. Spotless, Checkstyle, and `git diff --check` passed. The English clean source reactor passed all 123 tests (0 failures/errors/skips); the Chinese clean source reactor passed test compilation. Both reactors included the required IoTDB source dependencies and disabled local build-cache reuse. A local offline fallback was used because remote Maven plugin downloads were blocked. All newly added tests were run locally. This was focused library-udf verification, not a full-project fresh-dependency build. Separate baseline observations remain unchanged: `ExactOrderStatistics.getMedian` can overflow when adding the two middle extreme values, affecting median/MAD; `UDAFDTWMatch.combineState` replays only the source's final buffer without merging its historical match results. Both were present in the comparison base and were identified by static inspection, without executable reproduction in this round. They warrant separate follow-up. The source branch had not changed before the push. The push and final source/PR head confirmation are complete; the PR remains **Draft** because this round found behavior/test-logic issues. A fresh session must review the full final diff before Ready. No remote CI waiting or polling was performed. -- 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]
