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

[0.9.4.2] A tag key that is the same as a field key cannot be queried directly #4630

Closed
gunnaraasen opened this issue Oct 31, 2015 · 1 comment

Comments

Projects
None yet
4 participants
@gunnaraasen
Copy link
Member

commented Oct 31, 2015

If points are written to a measurement with a tag key and field key that are equal, the points with the tag key are not returned in query results when the tag key is included in any WHERE clause conditional using the equals (=) or regex (=~) operators.

$ influx
Connected to http://localhost:8086 version 0.9.4.2
InfluxDB shell 0.9.4.2
> create database test
> use test
Using database test
> format json
> insert cpu,missing=tag missing="field",value=1
> select * from cpu
{"results":[{"series":[{"name":"cpu","columns":["time","missing","value"],"values":[["2015-10-31T00:29:33.041336768Z","field",1]]}]}]}
> select * from cpu where missing = 'tag'
{"results":[{}]}
> select * from cpu where missing =~ /tag/
{"results":[{}]}
> select * from cpu where missing = 'field'
{"results":[{"series":[{"name":"cpu","columns":["time","missing","value"],"values":[["2015-10-31T00:29:33.041336768Z","field",1]]}]}]}

This could be fixed by either addressing issue #2615 or adding the field key renaming feature described in #4156.

@beckettsean beckettsean added the support label Nov 3, 2015

@jsternberg jsternberg self-assigned this Mar 16, 2016

jsternberg added a commit that referenced this issue Mar 23, 2016

Allow tags to be queried even when a field key exists with the same name
A measurement can have a field key on some series, but the field isn't
present on other series in that same measurement. If the series has a
tag with that name, that tag will be returned instead.

A series still cannot have both a field key and a tag key with the same name.

Fixes #4630.

@jsternberg jsternberg added this to the 0.13.0 milestone Apr 14, 2016

jsternberg added a commit that referenced this issue Apr 18, 2016

Allow tags to be queried even when a field key exists with the same name
A measurement can have a field key on some series, but the field isn't
present on other series in that same measurement. If the series has a
tag with that name, that tag will be returned instead.

A series still cannot have both a field key and a tag key with the same
name. This change also restricts `/write` so points like this cannot be
written.

Fixes #4630.

jsternberg added a commit that referenced this issue Apr 19, 2016

Allow tags to be queried even when a field key exists with the same name
A measurement can have a field key on some series, but the field isn't
present on other series in that same measurement. If the series has a
tag with that name, that tag will be returned instead.

A series still cannot have both a field key and a tag key with the same
name. This change also restricts `/write` so points like this cannot be
written.

Fixes #4630.

jsternberg added a commit that referenced this issue Apr 20, 2016

Allow tags to be queried even when a field key exists with the same name
A measurement can have a field key on some series, but the field isn't
present on other series in that same measurement. If the series has a
tag with that name, that tag will be returned instead.

A series still cannot have both a field key and a tag key with the same
name. This change also restricts `/write` so points like this cannot be
written.

Fixes #4630.

jsternberg added a commit that referenced this issue Apr 20, 2016

Allow tags to be queried even when a field key exists with the same name
A measurement can have a field key on some series, but the field isn't
present on other series in that same measurement. If the series has a
tag with that name, that tag will be returned instead.

A series still cannot have both a field key and a tag key with the same
name. This change also restricts `/write` so points like this cannot be
written.

Fixes #4630.

jsternberg added a commit that referenced this issue Apr 22, 2016

Allow tags to be queried even when a field key exists with the same name
A measurement can have a field key on some series, but the field isn't
present on other series in that same measurement. If the series has a
tag with that name, that tag will be returned instead.

A series still cannot have both a field key and a tag key with the same
name. This change also restricts `/write` so points like this cannot be
written.

Fixes #4630.

jsternberg added a commit that referenced this issue Apr 28, 2016

Allow tags to be queried even when a field key exists with the same name
A measurement can have a field key on some series, but the field isn't
present on other series in that same measurement. If the series has a
tag with that name, that tag will be returned instead.

A series still cannot have both a field key and a tag key with the same
name. This change also restricts `/write` so points like this cannot be
written.

Fixes #4630.
@jsternberg

This comment has been minimized.

Copy link
Contributor

commented May 2, 2016

Closing this in favor of #6519.

@jsternberg jsternberg closed this May 2, 2016

@jwilder jwilder removed this from the 0.13.0 milestone May 11, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.