SDK TimeAverage/Total count pre-first-sample time when the first sample is Uncertain (late-start interval) #821

Closed
opened 2026-11-11 00:05:57 -05:00 by dohertj2 · 2 comments
Owner

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.

  • Pin the divergence in SdkAggregateParityTests with an Uncertain-first late-start dataset.
  • Check the frozen live AggregateFilter calculators (src/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer/Compatibility/Aggregates/) and decide together with #809.
  • Add the reverse-order variant of the late-start case for QuestDB (only forward is covered).
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. - Pin the divergence in `SdkAggregateParityTests` with an Uncertain-first late-start dataset. - Check the frozen live AggregateFilter calculators (`src/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer/Compatibility/Aggregates/`) and decide together with #809. - Add the reverse-order variant of the late-start case for QuestDB (only forward is covered).
dohertj2 added the type:followuppriority:p3 labels 2026-11-11 00:05:57 -05:00
Author
Owner

Measured during the #815–#833 batch (#820/#821/#822 work). Dataset: interval QP [0,20), first sample Uncertain at +5 s.

Calculator Total TimeAverage DurationGood PercentGood
Part 13 / our HistoryRead 163.96 10.93 8000 40
Live frozen AggregateFilter (SDK 1.5.378) 188.96 9.45 15000 75
SDK 2.0.1 stock 188.96 9.45 8000 40

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).

Measured during the #815–#833 batch (#820/#821/#822 work). Dataset: interval QP [0,20), first sample Uncertain at +5 s. | Calculator | Total | TimeAverage | DurationGood | PercentGood | |---|---|---|---|---| | Part 13 / our HistoryRead | 163.96 | 10.93 | 8000 | 40 | | Live frozen AggregateFilter (SDK 1.5.378) | 188.96 | 9.45 | 15000 | 75 | | SDK 2.0.1 stock | 188.96 | 9.45 | 8000 | 40 | 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).
Author
Owner

All three items are on master (e7b485c0, docs 1a4d46a7) and re-verified 2026-11-11 against the live fixtures (Sql.Common 283, QuestDb.Integration 249, SqlServer.Integration 211, LiveAggregateLateStartFactsTests 1 — all green): the SDK divergence is pinned in SdkAggregateParityTests (Uncertain-first late start, Good-first control), the live AggregateFilter calculators are pinned by LiveAggregateLateStartFactsTests, and the reverse-order late-start case is in the shared QualityMixConformance (QuestDB + SqlServer). The remaining decision (whether live calculators should change) is #809 — findings copied there.

All three items are on master (`e7b485c0`, docs `1a4d46a7`) and re-verified 2026-11-11 against the live fixtures (Sql.Common 283, QuestDb.Integration 249, SqlServer.Integration 211, `LiveAggregateLateStartFactsTests` 1 — all green): the SDK divergence is pinned in `SdkAggregateParityTests` (Uncertain-first late start, Good-first control), the live AggregateFilter calculators are pinned by `LiveAggregateLateStartFactsTests`, and the reverse-order late-start case is in the shared `QualityMixConformance` (QuestDB + SqlServer). The remaining decision (whether live calculators should change) is #809 — findings copied there.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dohertj2/lmxopcua#821