docs(historian): #680 lane B review — QuestDB data-range lookups are partition scans, both-direction gate, all-Bad Count 0x80000401, outage-last parity test, CLAUDE.md per-sample bullet

This commit is contained in:
Joseph Doherty
2026-10-11 16:39:39 -04:00
parent b8344bb151
commit b5e3e5108c
5 changed files with 58 additions and 11 deletions
@@ -495,7 +495,7 @@ public sealed class QuestDbHistorianDataSource : IHistorianDataSource
rows.Add(ReadBucket(reader, family));
}
// The tag's data range (earliest + latest live sample): the start/end-of-data Partial rules (#677/#680 —
// forward reads of an aggregate other than Average) and Count's in-range empty interval (#680); skipped
// any per-sample aggregate but Average, either direction) and Count's in-range empty interval (#680); skipped
// otherwise.
if (AggregateEvaluator.NeedsDataRange(aggregate, plan))
{
@@ -458,7 +458,7 @@ public sealed class SqlServerHistorianDataSource : IHistorianDataSource
_ => SqlAggregateQueries.ActualTime(sample, aggregate == HistoryAggregateType.MaximumActualTime, plan.Reversed),
};
// Second result set: the tag's data range (earliest + latest sample) — the start/end-of-data Partial rules
// (#677/#680, forward reads of an aggregate other than Average) and Count's in-range empty interval (#680).
// (#677/#680 — any per-sample aggregate but Average, either direction) and Count's in-range empty interval (#680).
var needsRange = AggregateEvaluator.NeedsDataRange(aggregate, plan);
if (needsRange) sql += " " + SqlAggregateQueries.DataRange(sample);
await using var conn = await _conn.OpenAsync(cancellationToken).ConfigureAwait(false);