sdf-jkl commented on PR #18648:
URL: https://github.com/apache/datafusion/pull/18648#issuecomment-3992628232
I guess the first question is: do we really want to support edge cases like
`date_trunc('month', '2026-02-27') < '2026-02-23'`?
Why not fall back to not using preimage, like the `floor` function? What
arguments in favor of changing the API?
One argument I can think of is:
- Right now, it's up to the user to know not to use dates like `2026-02-XX`
(where `XX > 01`). Leaving that responsibility to the user is not good UX. I'd
be confused if some queries where the RHS day is `01` were faster than
otherwise identical queries with a different day value.
On the other hand:
- API change and extra complexity (not that big of a change and doesn't add
much complexity to the interval calculation)
--
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]