boluor opened a new pull request, #3734:
URL: https://github.com/apache/doris-website/pull/3734

   ## Summary
   
   `DATE_TRUNC` accepts both argument orders — `(<datetime>, <time_unit>)` and 
`(<time_unit>, <datetime>)` — but the **time unit must be a string constant**; 
it cannot be a column or a non-constant expression. Passing a column there 
fails with `the ... parameter of date_trunc function must be a string constant`.
   
   Added that constraint to the `<time_unit>` parameter description on the 
current/4.x EN and zh pages so the requirement is explicit.
   
   Reported in #2673.
   
   ## Test plan
   
   - [x] Confirmed in FE source (`DateTrunc.checkLegalityBeforeTypeCoercion` 
requires a string-literal time unit).
   - [x] Dead-link check passes.
   - [ ] CI build.
   
   Closes #2673


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