SDK TimeAverage/Total count pre-first-sample time when the first sample is Uncertain (late-start interval) #821
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found during #810. When data starts inside an interval and the first sample is Uncertain, the SDK's TimeAverage/Total also count the time before the first sample (as if ramping from 0). Example QP over [0,20): SDK Total 188.96 vs Part 13 163.96. Our SQL backends give the Part 13 answer; the conformance suite pins it by hand because the oracle wraps the SDK calculators.
SdkAggregateParityTestswith an Uncertain-first late-start dataset.src/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer/Compatibility/Aggregates/) and decide together with #809.Measured during the #815–#833 batch (#820/#821/#822 work). Dataset: interval QP [0,20), first sample Uncertain at +5 s.
So stock SDK 2.0.1 would fix #809 (DurationGood/PercentGood counting Uncertain as Good) but not this issue: TimeAverage/Total still count the pre-first-sample time. Keeping open for the decision (override the live calculator, or accept and document the divergence).
All three items are on master (
e7b485c0, docs1a4d46a7) and re-verified 2026-11-11 against the live fixtures (Sql.Common 283, QuestDb.Integration 249, SqlServer.Integration 211,LiveAggregateLateStartFactsTests1 — all green): the SDK divergence is pinned inSdkAggregateParityTests(Uncertain-first late start, Good-first control), the live AggregateFilter calculators are pinned byLiveAggregateLateStartFactsTests, and the reverse-order late-start case is in the sharedQualityMixConformance(QuestDB + SqlServer). The remaining decision (whether live calculators should change) is #809 — findings copied there.