Uncomplete flux query result?

Hi,

I have a bucket called “testdb” and I’m trying to execute some simple queries on it.

The structure of the bucket is very simple and (i think) is not important for the purpose of the question.

If I execute the following query I expect to get all the messages within the specified time range.

from(bucket: "testdb")
  |> range(start: 2022-04-01T00:00:00Z, stop: 2022-04-28T00:00:00Z)

The result is composed of the following tables. The only difference between the tables is given by the topic tag. This made me think that in my bucket there was only “diagnostic” topic and its sub-topics.

complete_query

If I execute the following query I expect to get a subset of the first query where the topics contain the “event” keyword. Since the query above does not return any table with the “event” keyword i expect to get an empty result, but it is not what I get.

import "strings"
from(bucket: "testdb")
  |> range(start: 2022-04-01T00:00:00Z, stop: 2022-04-28T00:00:00Z)
  |> filter(fn: (r) => strings.containsStr(v: r.topic, substr: "event"))

Query result:

filtered_query

So, summing up the question: Why the more general query does not return the “diagnostic” + “event” records?

Thanks in advance for the patience.

Edit:
Even executing the query

import "strings"
from(bucket: "testdb")
  |> range(start: 2022-04-01T00:00:00Z, stop: 2022-04-28T00:00:00Z)
  |> filter(fn: (r) => strings.containsStr(v: r.topic, substr: "event") or strings.containsStr(v: r.topic, substr: "diagnostic"))

I get the same result as the first query. (only “diagnostic” topics)

Hi @Casfed,
Can you let me know if you’re running this against InfluxDB OSS or InfluxDB Cloud? If OSS which version. I have tested this use case against the cloud and it should work.

Thanks for the interest @Jay_Clifford, I’m using InfluxDB OSS and the version is: InfluxDB v2.2.0 (git: a2f8538837) build_date: 2022-04-06T17:36:40Z

Note: I’ve noted that the problem persists only if I execute the query through the Data Explorer tool (from Google Chrome). Executing the same query (the more general one) through a simple C# program or Curl I get the correct result. Probably the query handles too many points for the browser?

Hi @Casfed,
Thank you for the debug on the case. Looks like a potential issue with the table UI in the data explorer. If you do the same query and add the table to a dashboard do you also still see the bug?

Will get it reported.
Thanks,
Jay