boluor commented on issue #2673:
URL: https://github.com/apache/doris-website/issues/2673#issuecomment-4515630921

   Thanks for the report. In the current (4.x) version, 
`DATE_TRUNC(<time_unit>, <datetime>)` does work with a non-constant 
`<datetime>` column — both argument orders are supported. The only requirement 
is that `<time_unit>` be a **string constant** (it can't be a column or 
non-constant expression); `<datetime>` may be a column.
   
   The error you hit is from 3.0.3, which had an older limitation on the 
argument order — that was fixed in 4.x. So the docs documenting both orders are 
correct for 4.x. We'll also add an explicit note that the time-unit argument 
must be a string constant. This can be closed for 4.x; thanks for flagging it!


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