[0.11] Change in LIMIT + regex behavior from 0.10
Without a regex, LIMIT behaves the same in 0.10 and 0.11. I receive the same results for the following queries in both versions:
> SELECT water_level FROM h2o_feet LIMIT 3
name: h2o_feet
--------------
time water_level
2015-08-18T00:00:00Z 8.12
2015-08-18T00:00:00Z 2.064
2015-08-18T00:06:00Z 8.005
> SELECT water_level FROM h2o_feet GROUP BY * LIMIT 3
name: h2o_feet
tags: location=coyote_creek
time water_level
---- -----------
2015-08-18T00:00:00Z 8.12
2015-08-18T00:06:00Z 8.005
2015-08-18T00:12:00Z 7.887
name: h2o_feet
tags: location=santa_monica
time water_level
---- -----------
2015-08-18T00:00:00Z 2.064
2015-08-18T00:06:00Z 2.116
2015-08-18T00:12:00Z 2.028
With a regex, LIMIT doesn't behave the same. The query SELECT * FROM /.*/ LIMIT 1 returns different results.
In 0.10, it returns 1 point from each measurement:
name: average_temperature
-------------------------
time degrees index level description location pH randtag water_level
2015-08-18T00:00:00Z 85 santa_monica
name: h2o_feet
--------------
time degrees index level description location pH randtag water_level
2015-08-18T00:00:00Z below 3 feet santa_monica 2.064
name: h2o_pH
------------
time degrees index level description location pH randtag water_level
2015-08-18T00:00:00Z santa_monica 6
name: h2o_quality
-----------------
time degrees index level description location pH randtag water_level
2015-08-18T00:00:00Z 41 coyote_creek 1
name: h2o_temperature
---------------------
time degrees index level description location pH randtag water_level
2015-08-18T00:00:00Z 70 santa_monica
In 0.11, it returns 1 point from a single measurement:
name: average_temperature
-------------------------
time degrees index level description location pH randtag water_level
2015-08-18T00:00:00Z 82
@rkuchan can you confirm that this happens if you manually specify two sources instead of a regex? I have a feeling it just applies to any query that uses multiple sources.
I was able to reproduce with multiple sources manually specified. It only seems to happen when the limit is lower than the total number of points, so if you have only one point in each measurement and use LIMIT 1, it's fine. If you have more than the limit, you hit the bug.
I should be able to have a fix for this soon. I have an idea where the error might be.