grafana / loki

Like Prometheus, but for logs.
https://grafana.com/loki
GNU Affero General Public License v3.0
23.51k stars 3.4k forks source link

fix: avg function result int unexpected response #13357

Closed yincongcyincong closed 3 months ago

yincongcyincong commented 3 months ago

What this PR does / why we need it:

Which issue(s) this PR fixes: Fixes #12176 #13287 avg_over_time function don't contain default group , then an error output.

error code line: https://github.com/grafana/loki/blob/main/pkg/logql/evaluator.go#L390

cyriltovena commented 3 months ago

cc @ashwanthgoli

ashwanthgoli commented 3 months ago

@yincongcyincong thanks for the contribution ❤️ really appreciate it. But I am closing this in the favour of an earlier pr https://github.com/grafana/loki/pull/12176 that fixes the same issue.