Georgios Ntanakas
06/27/2024, 7:50 AMmetrics_anomaly_score model around those lines.
Attempt to explain:
If bucket_start is null, then these window functions will randomly sort the rows for each partition and the rolling aggregations (avg, count etc.) will produce a different/not-consistent result for each row every time the code runs.
I think adding bucket_end to the ordering would fix the issue. To confirm, it seems that this is smth that you have faced before and you added a comment in this macro used for test.
Happy to open a github issue if that helps, thanks! 🙂