jacktengg opened a new pull request, #71274: URL: https://github.com/apache/doris/pull/71274
### What problem does this PR solve? Related PR: #71102 Reject negative TOPN_WEIGHTED increments before unsigned conversion and validate integer constant weights before narrowing; zero and valid positive weights remain accepted. Backports #71102 (`290b8adce7756f08d45b0029afee3635049ac701`) to `branch-4.2`. ### Backport notes Includes the small IntegerLikeLiteral range helper required by this fix, so the branch does not depend on the still-open #71095. Adapts the negative-weight unit test to branch-4.2\x27s existing TOPN test layout without importing unrelated master-only tests. ### Testing Passed source whitespace/conflict and Java 8 API checks, clang-format 16 on changed C++ lines, and a Clang syntax check of aggregate_function_topn_weighted.cpp using backport sources/generated headers with existing branch-4.2 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 Reject negative TOPN_WEIGHTED increments before unsigned conversion and validate integer constant weights before narrowing; zero and valid positive weights remain accepted. ### Check List (For Author) - Test: source/static compatibility checks described above; upstream tests carried forward. - Behavior changed: Yes, as in #71102. - Documentation: same scope as #71102. -- 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]
