influxdata / influxdata/kapacitor
.fill('null') property of Join node is not working as expected
- Dominant language
- Go
- Stars
- 2.4k
- Forks
- 479
- Avg merge
- 4d 16h
- Merged PRs (30d)
- 4
Description
I'm trying to join 2 measurements by "portName" tag. I need a full outer join of first table (flogi) but when I set fill('null') it seams no effect.
My tick script:
var flogi = stream
|from()
.database('kap_telegraf')
.measurement('flogi')
|groupBy('portName')
var deviceAlias = stream
|from()
.database('kap_telegraf')
.measurement('deviceAlias')
@Conversion()
.tag('index')
.as('portName')
|groupBy('portName')
flogi
|join(deviceAlias)
.as('flogi', 'deviceAlias')
.fill('null')
.tolerance(1m)
|default()
.field('deviceAlias.deviceName', 'none')
|influxDBOut()
.database('telegraf')
.measurement('flogi')
.retentionPolicy('autogen')
.tag('kapacitor', 'true')
DOT:
digraph kap_data_enrich2 {
graph [throughput="0.00 points/s"];
stream0 [avg_exec_time_ns="0s" errors="0" working_cardinality="0" ];
stream0 -> from3 [processed="75"];
stream0 -> from1 [processed="75"];
from3 [avg_exec_time_ns="745ns" errors="0" working_cardinality="0" ];
from3 -> Conversion4 [processed="50"];
Conversion4 [avg_exec_time_ns="110.1µs" errors="0" working_cardinality="0" ];
Conversion4 -> groupby5 [processed="50"];
groupby5 [avg_exec_time_ns="10.795µs" errors="0" working_cardinality="0" ];
groupby5 -> join7 [processed="50"];
from1 [avg_exec_time_ns="735ns" errors="0" working_cardinality="0" ];
from1 -> groupby2 [processed="25"];
groupby2 [avg_exec_time_ns="1.157µs" errors="0" working_cardinality="0" ];
groupby2 -> join7 [processed="25"];
join7 [avg_exec_time_ns="27.592µs" errors="0" working_cardinality="51" ];
join7 -> default8 [processed="24"];
default8 [avg_exec_time_ns="0s" errors="0" fields_defaulted="0" tags_defaulted="0" working_cardinality="0" ];
default8 -> influxdb_out9 [processed="24"];
influxdb_out9 [avg_exec_time_ns="250.397µs" errors="0" points_written="24" working_cardinality="0" write_errors="0" ];
}
I'm getting in the result 24 points out of the join. But groupBy2(flogi measurement) are 25 points. I know that this one that is missing is not in the deviceAlias measurement. But I'm using fill() property and in my understanding should return this point with 'null'.
OBS: if I remove fill('null') seams no effect in the script.
Contributor guide
Research direction
Start with the Join node's fill('null') behavior and reproduce the supplied tick script, using the DOT graph to compare the 25 flogi points with the 24 join outputs. Done means the full outer join retains the unmatched flogi point with a null deviceAlias value, while confirming whether removing fill('null') changes the result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- stream-processing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100