findColumn results in contains

Using InfluxDB 2.1.1 on Linux

I’m trying to extract values from a column into an array which I can use in a contains() function but I keep tripping on something. For some reason it only matches rows with what I assume is the last value in the array

Here’s what I’ve done

mySeries1 has a tag called ‘id’ containing a number as string
mySeries2 has an equivalent tag

// this returns 12 entries
myList = from(bucket: "myBucket")
|> range(start:    v.timeRangeStart, stop:  v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "mySeries1")
|> group(columns: ["id"])
|> last()
|> group(columns: ["_measurement"])
|> findColumn(fn: (key) => true, column: "id")


// here I only get rows with the last id in the list above
from(bucket: "myBucket")
|> range(start:   v.timeRangeStart, stop:  v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "mySeries2")
|> filter(fn: (r) =>  contains(value: r.id, set: myList ))

What am I doing wrong here?

Hello @mac_greggy,
This looks like a bug to me. I’m asking around to make sure.

Hi @Anaisdg

Did I hit a bug or did my brain bug? Should I open an github issue?

1 Like

@mac_greggy can you please open an issue?

Thank you!

Done

1 Like