San Kumar
07/16/2025, 7:22 PMXiang Fu
DATETRUNC returns you the hours epoch value, but toEpochSeconds takes the input millis (LONG): Epoch timestamp in milliseconds.
https://docs.pinot.apache.org/functions-1/datetrunc#signature
https://docs.pinot.apache.org/functions/datetime-functions#toepochseconds