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

   Related PR: https://github.com/apache/doris/pull/64127
   
   Problem Summary:
   
   `nullable('...')` string literals are unwrapped during signature search and 
coerced like bare literals. For:
   ```sql
   month(nullable('2021-12-31 12:23:34'))
   ```
   the argument is coerced to DATETIMEV2(6).
   
   But Month declared its datetime overload as `DateTimeV2Type.SYSTEM_DEFAULT`, 
which is `DATETIMEV2(0)`. `DATETIMEV2(6)` does not match that narrow signature, 
so signature matching falls through to the DATEV2 overload and reports:
   ```text
   ERROR 1105 (HY000): errCode = 2, detailMessage = argument 1 requires datev2 
type, however 'cast(nullable('2025-02-20 12:12:12') as DATETIMEV2(6))' is of 
datetimev2 type
   ```
   
   


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