zhangstar333 opened a new pull request, #36000: URL: https://github.com/apache/doris/pull/36000
## Proposed changes before: ``` select week(cast('0000-01-01' as DATEV2), cast(2 as INT)); +----------------------------------------------------+ | week(cast('0000-01-01' as DATEV2), cast(2 as INT)) | +----------------------------------------------------+ | 52 | +----------------------------------------------------+ 1 row in set (0.00 sec) ``` but it's should return 1 as result, mode 2 is start with a Sunday day as first week in this year. and special case for 0000-01-01, as it's SATURDAY, calculate result of 52 is last year, so it's meaningless. <!--Describe your changes.--> -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org