influxdb icon indicating copy to clipboard operation
influxdb copied to clipboard

Derivative function unnecessarily requires aggregate function

Open legendary-jarppi opened this issue 11 years ago • 4 comments

version: 0.9.4.1 rpm: https://s3.amazonaws.com/influxdb/influxdb_0.9.4.1_amd64.deb system: amazon linux 3.14.35-28.38.amzn1.x86_64

Running query:

select derivative(count) from "jvm.gc" group by instanceId, name

works fine, while:

select derivative(count) from "jvm.gc" where time > now() - 3600s group by instanceId, name

returns error:

ERR: error parsing query: aggregate function required inside the call to derivative

I don't think the second query should require aggregate function call, because there is no grouping by time. Query just limits the amount of rows returned, but does not change the first query in any other way.

legendary-jarppi avatar Sep 17 '15 14:09 legendary-jarppi

@jwilder

rkuchan avatar Sep 17 '15 17:09 rkuchan

I made a pull request with proposed fix for this. If it seems like the right thing to do, I can also add tests for it.

legendary-jarppi avatar Sep 17 '15 17:09 legendary-jarppi

See https://github.com/grafana/grafana/issues/2802

HakShak avatar Sep 23 '15 14:09 HakShak

closing in favor of https://github.com/influxdb/influxdb/issues/4187

beckettsean avatar Sep 25 '15 20:09 beckettsean