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

SHOW TAG VALUES no longer accepting negative regex in WHERE clause #6607

Closed
toddiuszho opened this issue May 11, 2016 · 3 comments
Closed

SHOW TAG VALUES no longer accepting negative regex in WHERE clause #6607

toddiuszho opened this issue May 11, 2016 · 3 comments
Assignees
Milestone

Comments

@toddiuszho
Copy link

toddiuszho commented May 11, 2016

Bug report

System info:

Issue NOT found in:

InfluxDB 0.10.0

Issue IS found in:

InfluxDB 0.11.1
InfluxDB 0.12.2

Steps to reproduce:

> CREATE DATABASE ru
> INSERT INTO ru.default rainfall,loc=tx inches=15
> INSERT INTO ru.default rainfall,loc=tx inches=17
> INSERT INTO ru.default rainfall,loc=tn inches=18
> INSERT INTO ru.default rainfall,loc=ak inches=8
> INSERT INTO ru.default rainfall,loc=la inches=82
> SHOW TAG VALUES FROM rainfall WITH KEY=loc
name: rainfall
--------------
key value
loc tx
loc tn
loc ak
loc la

> SHOW TAG VALUES FROM rainfall WITH KEY=loc WHERE loc =~ /t/
name: rainfall
--------------
key value
loc tx
loc tn

> SHOW TAG VALUES FROM rainfall WITH KEY=loc WHERE loc !~ /t/

> SHOW TAG VALUES FROM rainfall WITH KEY=loc WHERE loc =~ /a/
name: rainfall
--------------
key value
loc ak
loc la

> SHOW TAG VALUES FROM rainfall WITH KEY=loc WHERE loc !~ /a/

> SELECT * FROM rainfall WHERE loc =~ /a/
name: rainfall
--------------
time            inches  loc
1462999509776729027 8   ak
1462999515885752604 82  la

> SELECT * FROM rainfall WHERE loc !~ /a/
name: rainfall
--------------
time            inches  loc
1462999491911662014 15  tx
1462999496985762161 17  tx
1462999504196850606 18  tn

Expected behavior:

Negative regex !~ in WHERE clause should work same for SELECT and SHOW TAG VALUES. Positive regex =~ still works. Both negative and positive used to work in 0.10.0.

Actual behavior:

Every SHOW TAG VALUES I write with a negative regex in WHERE clause show no results and no errors. It doesn't matter how simple or complex I write the WHERE clause. If a negative regex is anywhere in the WHERE clause, empty results are returned.

Additional info:

Notice how both positive and negative regex works fine for SELECT, so query and datapoints are sound. Also, please do not mistake this for a similar issue discussing regex in the KEY clause of a SHOW TAG VALUES. This Bug Report is for regex in WHERE clause.

@jsternberg jsternberg self-assigned this May 12, 2016
@jsternberg jsternberg added this to the 1.0.0 milestone May 12, 2016
@jsternberg
Copy link
Contributor

Confirming this happens in master. Also found something very strange. If you do this:

> show tag values from rainfall with key=loc where loc !~ /tat/
name: rainfall
--------------
key     value
loc     tx
loc     tn
loc     ak
loc     la

It works perfectly. So the problem seems to be that if a negative regex and it matches any tag value, it kills the whole measurement.

@ucrkarthik
Copy link

Could we use "time" as a filter criterion in the where class in the SHOW TAG query?

@jsternberg
Copy link
Contributor

jsternberg commented Jun 10, 2016

@ucrkarthik please use the mailing list to ask questions. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants