this PR #22602 have check function. only support date_trunc(column, const), so the second must be const literal and no need to check time unit every row.
Status
[[nodiscard]]