influxdb: Selecting from sub query is returning unexpected data in specific cases

Bug report

System info: Influxdb 1.2, Max OS 10.12.2

Steps to reproduce:

  1. Seed influx with data
  2. Run select * from workflows group by work_id order by time desc limit 1. This is the sub query, which returns the correct data I want to filter on.
  3. Then run the full query SELECT * FROM (select * from workflows group by work_id order by time desc limit 1 ) WHERE state = 'error'. This returns expected data.
  4. Then run SELECT * FROM (select * from workflows group by work_id order by time desc limit 1 ) WHERE state = 'render'. This returns expected data.
  5. Then run SELECT * FROM (select * from workflows group by work_id order by time desc limit 1 ) WHERE state = 'send' This returns unexpected data.

Expected behavior: I expect the sub query to only return the items that match the where clause, after the sub query sorts them and limits them to one.

Actual behavior: It returns data that should not be in the subquery.

Additional info: It seems like the sub query is not carrying over the correct data possibly. valid-1 valid-2 bad-data screen shot 2017-01-24 at 4 12 34 pm

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 33 (13 by maintainers)

Most upvoted comments

I think this is now fixed and will be merged back to master soon. I’m going to close this. There may be remaining issues with how conditions are evaluated so please comment if this is still not working.