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

Panic when using a where clause that reference columns with null values #105

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

Comments

@jvshahid
Copy link
Contributor

jvshahid commented Dec 5, 2013

With the following data in foo

[
  {
    "name": "test_issue_105",
    "columns": ["time", "a", "b"],
    "points":[
          [1386262529794, 2, 1],
          [1386262529794, 2, null]
      ]
  }
]

Running the queries

Influx> select * from foo where b > 0
Influx> select * from foo where b > 0.0

will cause the following panic and no results to be returned

********************************BUG********************************
Database: foo
Query: [select * from foo where b > 0]
Error: runtime error: invalid memory address or nil pointer dereference. Stacktrace: goroutine 62 [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
common.CoerceValues(0x0, 0xc2100db880, 0xc2100db880, 0x0, 0xc2100c57b0, ...)
    /home/jvshahid/codez/influxdb/src/common/coerce_values.go:18 +0x28
datastore.GreaterThanOperator(0x0, 0xc2100db880, 0xc210074170, 0xc210074100, 0xc2100740d0)
    /home/jvshahid/codez/influxdb/src/datastore/boolean_operators.go:92 +0x31
datastore.func·001(0x0, 0xc2100cfcc0, 0x1, 0x1, 0xc210074170, ...)
    /home/jvshahid/codez/influxdb/src/datastore/boolean_operators.go:19 +0x98
datastore.matchesExpression(0xc2100db100, 0xc21004c900, 0x2, 0x2, 0xc2100db6c0, ...)
    /home/jvshahid/codez/influxdb/src/datastore/filtering.go:60 +0x23d
datastore.matches(0xc210120f30, 0xc21004c900, 0x2, 0x2, 0xc2100db6c0, ...)
    /home/jvshahid/codez/influxdb/src/datastore/filtering.go:65 +0x91
datastore.Filter(0xc21014a090, 0xc2100d1910, 0x3, 0xc2100c5ad0, 0x1)
@ghost ghost assigned jvshahid Dec 5, 2013
jvshahid pushed a commit that referenced this issue Aug 12, 2014
chore(README): minor grammar fixes
@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