SHOW TAG VALUES no longer accepting negative regex in WHERE clause
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.
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.
Could we use "time" as a filter criterion in the where class in the SHOW TAG query?
@ucrkarthik please use the mailing list to ask questions. Thank you.