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

   Fixes 19304 — six defects, each reproduced against master before fixing and 
covered by new unit tests.
   
   **library-udf `dprofile` — query-scoped state (4 files)**
   - `UDTFMvAvg`: promote `windowSum` to an instance field and reset it in 
`beforeStart`; it was a `transform()` local, so the "sliding mean" was actually 
`(new − evicted) / w`.
   - `UDTFMinMax`: skip non-finite rows entirely so the timestamps/values 
tables stay in lockstep (same approach as `UDTFZScore`).
   - `UDTFSegment`: move the two collected lists from `static` to instance 
fields — UDTF instances are per-query, the static lists let overlapping queries 
erase each other.
   - `UDAFPercentile`: move the 4 exact-count maps from `static` to instance 
state; `PercentileOperations.initialize/insertExact` now take the owning 
`UDAFPercentile` (same pattern as `UDTFDistinct`), so the shared singleton no 
longer reassigns static state.
   
   **`UDTFHistogram` — overflow-safe bucketing**
   Keep the original formula for finite gaps (zero behaviour change, covered by 
per-bucket assertions); when `end - start` overflows to ±Inf (auto boundaries) 
fall back to a stable interval-centre based mapping that is monotonic, reaches 
both endpoint buckets, and degenerates to the old clamp when `start == end`.
   
   **`calc-commons` — inclusive gap-fill endpoint**
   `hasRemainingGapInPreviousGroup()` compared `currentTime < endTime` while 
the group-switch path and `fillGaps` treat `endTime` as inclusive; the last gap 
point at `endTime` was silently dropped when the final real row sat at `endTime 
− step`.
   
   Tests: 10 new library-udf tests via a shared lifecycle-fake harness 
(`UdfTestFakes`), 1 new datanode gap-fill operator case 
(`testGapFillWoGroupWoMoOperator3`) — `mvn -pl library-udf test` 29/29 green, 
spotless clean; `GapFillWoGroupWoMoOperatorTest` 3/3 green. The MvAvg and 
gap-fill fixes were also regression-checked by reverting the source change and 
observing the new tests fail, then re-applying.


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