You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
select derivative(cumulative_sum(sum(events)), 1m) from measurement
where $timeFilter group by $interval
Expected behavior: Same result as with this select statement that uses a sub-query instead of nesting:
select derivative(x, 1m) from (select cumulative_sum(sum(events)) as x
from measurement
where $timeFilter group by $interval)
Actual behavior:
ERR: error parsing query: expected field argument in cumulative_sum()
Additional info:
background/use-case: the events could originate from a - say - process manager that reports at irregular intervals how many processes it has started since the last time. The objective is then to get a start-rate normalized over a certain interval - here 1 minute - with varying resolution (here $interval) for varying periods (here $timeFilter).
The text was updated successfully, but these errors were encountered:
Function nesting basically not supported except for a few combinations.
The documentation is not very clear on what is legal, but in general if a combination isn't mentioned in a documentation example it will probably be rejected by the query parser - though it is always worth trying things just in case they work!
I raised a more general issue for this (#7438) but the conclusion seemed to be that we should use subqueries rather than nested function calls.
I believe the primary problem here is that cumulative_sum() does not support function nesting. I'm going to close this since using a subquery is possible instead. It doesn't appear to be a bug.
Bug report
System info: Influxdb 1.2.2, RHEL 6
Steps to reproduce:
Expected behavior: Same result as with this select statement that uses a sub-query instead of nesting:
Actual behavior:
Additional info:
background/use-case: the events could originate from a - say - process manager that reports at irregular intervals how many processes it has started since the last time. The objective is then to get a start-rate normalized over a certain interval - here 1 minute - with varying resolution (here $interval) for varying periods (here $timeFilter).
The text was updated successfully, but these errors were encountered: