Open hyamanieu opened 4 months ago
Whether summarizing or not summarizing, if input is empty, it should return an empty value rather than throwing an error. According to me, whether we:
the same result shall be received: an empty Table.
This is important as we cannot know in advance if our API call will return an array with 0 or several elements. It also impacts the use within alerts.
sum(value)
group
[]
Result:
error getting data frame from inline data. summarize by field not found. Not applying summarize
I would expect the same result as follows:
[ { "group": "A", "id": 1, "value": 42 }, { "group": "B", "id": 2, "value": 37 }, { "group": "A", "id": 3, "value": 28 }, { "group": "C", "id": 4, "value": 53 }, { "group": "B", "id": 5, "value": 19 }, { "group": "C", "id": 6, "value": 45 }, { "group": "A", "id": 7, "value": 32 }, { "group": "B", "id": 8, "value": 29 }, { "group": "C", "id": 9, "value": 61 } ]
Result: <0 series returned> (aka empty table) or for - Source: Inline - Filter : value > 100 - data: `[]` Result: <0 series returned> (aka empty table) ## **Version Details:** - Grafana version : 10.4.1 - Plugin version : 0.7.1
I have also had this issue and it trips me up often!
Describe the bug
Whether summarizing or not summarizing, if input is empty, it should return an empty value rather than throwing an error. According to me, whether we:
the same result shall be received: an empty Table.
This is important as we cannot know in advance if our API call will return an array with 0 or several elements. It also impacts the use within alerts.
Steps to reproduce
sum(value)
group
[]
Result:
I would expect the same result as follows:
sum(value)
group