jacktengg opened a new pull request, #71273: URL: https://github.com/apache/doris/pull/71273
### What problem does this PR solve? Related PR: #70512 Apply HAVING before the final distinct-streaming aggregation LIMIT, so rejected groups do not consume the result limit. Backports #70512 (`e1ed017a6c25c70c5199d23eb390e0442291e5f8`) to `branch-4.2`. ### Backport notes Adapted the filter_block call to branch-4.2 and preserved its existing streaming-preaggregation policy. Both single-block and multiple-block HAVING/LIMIT tests are retained. ### Testing Passed source whitespace/conflict checks, clang-format 16 on changed C++ lines, and a Clang syntax check of distinct_streaming_aggregation_operator.cpp using backport sources/generated headers and existing branch-4.2 compiler settings/dependencies. The upstream unit/regression coverage is included where applicable. Full builds and runtime unit/regression tests were not run on this backport branch; upstream test results are not claimed as backport results. ### Release note Apply HAVING before the final distinct-streaming aggregation LIMIT, so rejected groups do not consume the result limit. ### Check List (For Author) - Test: source/static compatibility checks described above; upstream tests carried forward. - Behavior changed: Yes, as in #70512. - Documentation: same scope as #70512. -- 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]
