mrhhsg opened a new pull request, #70239:
URL: https://github.com/apache/doris/pull/70239

   ### What problem does this PR solve?
   
   Issue Number: None
   
   Related PR: #69964
   
   A bounded ROWS frame can become empty after a nonempty frame. The 
`quantile_union` aggregate previously reset only its first-input flag, leaving 
samples from the prior frame in `QuantileState`. Empty and NULL-only frames 
could consequently return stale quantiles.
   
   ### What is changed?
   
   - Reset the aggregate's `QuantileState` together with its first-input flag.
   - Add `QuantileState::reset()` to discard samples while retaining 
explicit-vector capacity; preserve `clear()`'s capacity-release behavior.
   - Add focused unit and SQL regression coverage for empty, NULL-only, and 
repeated frames.
   
   ### Release note
   
   Fix `quantile_union` over empty window frames so `quantile_percent` returns 
NaN rather than values from an earlier frame.
   
   ### Test
   
   - ASAN BE+FE build, including FE Checkstyle: passed.
   - Focused ASAN BE unit tests: 7/7 passed.
   - Quantile SQL regression suites: 3/3 passed.
   - clang-format, check-format, and `git diff --check`: passed.


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to