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

   ### What problem does this PR solve?
   
   Issue Number: N/A
   
   For example, `topn_weighted(CAST('2024-01-01 00:00:00' AS DATETIMEV2(0)), 
CAST(1 AS BIGINT), 1, 100)[1]` fails at execution with a return-type mismatch: 
FE expects a string while BE produces an array of datetime values.
   
   The four-argument DATETIMEV2 and DECIMALV2 overloads incorrectly declare 
VARCHAR return types. Match their array return types to the existing 
three-argument overloads, preserving the existing datetime precision inference 
and BE implementation. Add signature coverage and SQL regression tests for both 
arities, datetime precision, nullable input, grouping, empty input and array 
extraction.
   
   ### Release note
   
   Fix `topn_weighted` four-argument return-type declarations for datetime and 
legacy decimal inputs so they match the array implementation.
   
   ### Check List (For Author)
   
   - Test:
       - [x] Regression test: `topn_weighted_return_type`; generated output and 
normal result comparison both passed on the newly built FE with a local ASAN BE.
       - [x] Unit Test: `TopNWeightedSignatureTest`; all 3 tests passed.
   - Behavior changed:
       - [x] Yes. Fix previously failing four-argument calls to return arrays.
   - Does this need documentation?
       - [x] No. The documented return type is already an array.
   
   FE build with integrated Checkstyle and `git diff --check` passed. Legacy 
DECIMALV2 is checked in the FE signature tests; SQL regression also exercises 
the current DECIMAL input coercion path.
   
   ### Check List (For Reviewer who merge this PR)
   
   - [ ] Confirm the release note
   - [ ] Confirm test cases
   - [ ] Confirm document
   - [ ] Add branch pick label
   


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