Influxdb: [1.6.3] FIRST(),LAST() do not return the relevant timestamp with * or regex input

Created on 28 Sep 2018  路  4Comments  路  Source: influxdata/influxdb

__System info:__ [InfluxDB shell version: 1.6.3, Ubuntu 16.04.5 LTS]

__Steps to reproduce:__

Using the sample data from the docs:

The following queries return the correct timestamp as expected:

> use NOAA_water_database
Using database NOAA_water_database
> SELECT FIRST(water_level) FROM h2o_feet WHERE location = 'santa_monica'
name: h2o_feet
time                 first
----                 -----
2015-08-18T00:00:00Z 2.064
> SELECT LAST(water_level) FROM h2o_feet WHERE location = 'santa_monica'
name: h2o_feet
time                 last
----                 ----
2015-09-18T21:42:00Z 4.938

but when using * or a regular expression a 1970 timestamp is returned:

> SELECT FIRST(/level/) FROM h2o_feet WHERE location = 'santa_monica'
name: h2o_feet
time                 first_level description first_water_level
----                 ----------------------- -----------------
1970-01-01T00:00:00Z below 3 feet            2.064
> SELECT LAST(/level/) FROM h2o_feet WHERE location = 'santa_monica'
name: h2o_feet
time                 last_level description last_water_level
----                 ---------------------- ----------------
1970-01-01T00:00:00Z between 3 and 6 feet   4.938
> SELECT FIRST(*) FROM h2o_feet WHERE location = 'santa_monica'
name: h2o_feet
time                 first_level description first_water_level
----                 ----------------------- -----------------
1970-01-01T00:00:00Z below 3 feet            2.064
> SELECT LAST(*) FROM h2o_feet WHERE location = 'santa_monica'
name: h2o_feet
time                 last_level description last_water_level
----                 ---------------------- ----------------
1970-01-01T00:00:00Z between 3 and 6 feet   4.938

__Additional info:__

This appears to be a subcase of issue #5890

1.x arequeries wontfix

All 4 comments

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

This issue has been automatically closed because it has not had recent activity. Please reopen if this issue is still important to you. Thank you for your contributions.

Still an issue as of 1.7.9

@jsternberg any thoughts on this issue?

Was this page helpful?
0 / 5 - 0 ratings