influxdata / influxdata/kapacitor

union node in tick script fails to buffer data to UDF when one of the query nodes results in empty data

Open
#2,447 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
2.4k
Forks
479
Avg merge
4d 16h
Merged PRs (30d)
4

Description

Union node in tick script fails to buffer data to UDF when one of the query nodes results in empty data. For example: In below tick script:
dbrp "db"."autogen"
var A = batch
| query('select * from "db"."autogen"."A"')
.period(1m)
.every(1m)
var B = batch
| query('select * from "db"."autogen"."B"')
.period(1m)
.every(1m)
var A_B = A
| union(B)
.rename('A_B')
A_B
@utilization()
| influxDBOut()
.database('derived')
.retentionPolicy('live_data')
.measurement('utilization')

**Scenario 1:**
for time snap shot T1 -> Results from two queries are A1 and B1
for time snap shot T2 -> Results from two queries are A2 and B2
tick script sends data appropriately.

**Scenario 2:**
for time snap shot T1 -> Results from two queries are A1 and B1
for time snap shot T2 -> Results from two queries are A2 and B2
If A1 is empty, then instead of sending B1 at T1 -> nothing is sent
At T2 -> B1+ A2+ B2 data set is sent.

Let me know if further clarifications or logs are needed.

I have tested this on following kapacitor versions: 1.5.5 and OSS 1.5.6

Contributor guide

Open the contributing guide

Research direction

No source file, test, or entry point is named. Reproduce the provided Tick script with the union and UDF across the reported Kapacitor versions, then trace the union buffering behavior when one query returns empty data. Done means B1 is emitted at T1 and is not carried into the T2 output alongside A2 and B2.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
stream-processing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.