Recent edition of InfluxDb (2.0.2) - Last() function not work as expected

I just encountered this issue. I’m retrieving metric values in timestamp order, and last() worked correctly for a few days (returning a single most recent value), then stopped working (returning a single older value). There were no configuration changes made to the database or to the query during the time between when it was working and when it stopped working.

Adding a group() statement to the query has restored the expected behaviour.

I can reproduce this oddness with my dataset in the data explorer, and have observed the following:

a) first() always works, with and without a group() - returns _time 2020-12-13T22:37:33.494Z
b) last() without the group() returns _time 2020-12-13T23:59:55.833Z
c) last() with the group() returns _time 2020-12-16T09:10:57.566Z

There are over a thousand records between 2020-12-13T22:37:33.494Z and 2020-12-13T23:59:55.833Z, and tens of thousands of records after that timestamp. Nothing unusual at that time, too. A full query shows results before, at, and after that time.

Definitely something odd going on.