Closed redbaron closed 1 year ago
Iterate over result from following query
import "sampledata" s = sampledata.int() |> filter(fn: (r) => r.tag == "t1") s |> map(fn: (r) => ({r with xyz: 99})) |> yield(name: "t1") s |> map(fn: (r) => ({r with abc: ""})) |> yield(name: "t2")
using standard pattern:
for r.Next() { if r.TableChanged() { row := r.Record() fmt.Printf("result=%s table=%s\n" , row.Result(), row.Table()) } }
I'd expect TableChanged() to trigger twice
TableChanged() doesn't take into account change of result created by yield.
No response
OK, it seems that TablChanged() correctly reports new .Result(), but not .Record().Table() within Result(), which has to be tracked manually.
TablChanged()
.Record().Table()
Specifications
Steps to reproduce
Iterate over result from following query
using standard pattern:
Expected behavior
I'd expect TableChanged() to trigger twice
Actual behavior
TableChanged() doesn't take into account change of result created by yield.
Additional info
No response