Using absent_over_time with logical operator returns "Unimplemented" error.
Describe the bug Using absent_over_time with logical operator returns "Unimplemented" error.
I am working to make a metric query that don't return NULL as the following example.
sum(count_over_time({namespace="traefik"} |= "foo" [1m]))
or
sum(absent_over_time({namespace="traefik"} |= "foo" [1m])) == bool
Using the 2nd query with absent_over_time alone works fine. But when I use it with 1st query with logical operator didn't work ("Unimplemented" error). I tried using different logical operators and swap 1st and 2nd but the same error.
To Reproduce Run the query like the above example.
Expected behavior No error returned from the query.
Environment:
- Loki 2.5
- Grafana 9.0.7
Screenshots, Promtail config, or terminal output
The same error
count_over_time({container_name="jsoncollector"}[2m]|="error") or absent_over_time({container_name="jsoncollector"}[2m]|="error")
⚠️ Unimplemented
I think that this issue might be bug but it seems that the original purpose can be archived by using the query below.
sum(count_over_time({namespace="traefik"} |= "foo" [1m]))
or
vector(0)
Ref: https://grafana.com/docs/loki/latest/query/metric_queries/#functions