Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Derivative function panics when a bucket has one point only #106

Closed
jvshahid opened this issue Dec 5, 2013 · 0 comments
Closed

Derivative function panics when a bucket has one point only #106

jvshahid opened this issue Dec 5, 2013 · 0 comments

Comments

@jvshahid
Copy link
Contributor

jvshahid commented Dec 5, 2013

With the following data in foo

[{"a": 2, "b": 1}, {"a": 2, "b": 15}, {"a": 2, "b": 15}]

Running a query with derivative like this

Influx> select count(a) from foo group by time(10s)
┌───────────────┬───────┐
│ time          │ count │
├───────────────┼───────┤
│ 1386262520000 │ 3     │
│ 1386262500000 │ 1     │
└───────────────┴───────┘
Influx> select derivative(a) from foo group by time(10s)

Result in the following panic:

********************************BUG********************************
Database: foo
Query: [select derivative(a) from foo group by time(1s)]
Error: runtime error: invalid memory address or nil pointer dereference. Stacktrace: goroutine 17 [running]:
engine.func·004()
    /home/jvshahid/codez/influxdb/src/engine/engine.go:29 +0x118
runtime.panic(0x7dd2a0, 0xe7c1e8)
    /home/jvshahid/.gvm/gos/go1.2/src/pkg/runtime/panic.c:248 +0x106
engine.(*DerivativeAggregator).GetValues(0xc2100bed40, 0xc2100fc478, 0x3, 0x7397a0, 0x4eccc659b4240, ...)
    /home/jvshahid/codez/influxdb/src/engine/aggregator.go:229 +0x11a
engine.(*QueryEngine).executeCountQueryWithGroupBy(0xc21000ad30, 0x7f26a06e17b8, 0xc2100db8c0, 0xc210076086, 0x3, ...)
    /home/jvshahid/codez/influxdb/src/engine/engine.go:354 +0xf98
engine.(*QueryEngine).RunQuery(0xc21000ad30, 0x7f26a06e17b8, 0xc2100db8c0, 0xc210076086, 0x3, ...)
    /home/jvshahid/codez/influxdb/src/engine/engine.go:43 +0x147
api/http.func·001(0x7f26a06e17b8, 0xc2100db8c0, 0x1, 0xc21005b640, 0x623538)
    /home/jvshahid/codez/influxdb/src/api/http/api.go:222 +0x28e
api/http.yieldUser(0x7f26a06e17b8, 0xc2100db8c0, 0x7f269c587c18, 0xc21007608c, 0x3, ...)
    /home/jvshahid/codez/influxdb/src/api/http/api.go:507 +0x3b
api/http.(*Ht
@ghost ghost assigned jvshahid Dec 5, 2013
@jvshahid jvshahid removed their assignment Feb 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant