wip: make lookback ignore sample on left bound

This commit is contained in:
Zhang Zhanpeng 2024-05-26 17:31:54 +08:00
parent 381f8d52e0
commit bcf9d77bbb

View file

@ -499,6 +499,8 @@ func (ng *Engine) newQuery(q storage.Queryable, qs string, opts QueryOpts, start
if lookbackDelta <= 0 {
lookbackDelta = ng.lookbackDelta
}
// lookback shall ignore the sample falling on the left bound
lookbackDelta -= time.Duration(time.Millisecond.Nanoseconds() * 1)
es := &parser.EvalStmt{
Start: start,