It appears date_trunc is always returning a DateTime. Which means it's useless if you pass a DateTime64 or a Date32 that is before 1970 because it will convert to an unexpected value. I imagine the ...
I had originally believed this to be a bug with the date_trunc() simplification rule in the optimizer, but a bit of digging revealed that the rule appears to be correct, but the RHS gets truncated ...
Some results have been hidden because they may be inaccessible to you
Show inaccessible results