mirror of
https://github.com/grafana/grafana.git
synced 2025-07-30 19:02:36 +08:00
SQL: Fix SQL dataframe resampling (fill mode + time intervals) (#36937)
* Refactor resample logic * Adjust test to have one more timestamp out of range * adjust test + ensure filling * revert flag flip * Undo logic - should be timeseries only * change data calculation based on previous interval * fix the logics * fix typo * fix resample start time, to reuse what sql api returned * calculate the start point with from truncate by interval Co-authored-by: Will Browne <will.browne@grafana.com> Co-authored-by: Will Browne <wbrowne@users.noreply.github.com> Co-authored-by: Ying WANG <ying.wang@grafana.com>
This commit is contained in:
@ -335,10 +335,6 @@ func (e *dataPlugin) executeQuery(query plugins.DataSubQuery, wg *sync.WaitGroup
|
||||
e.log.Error("Failed to resample dataframe", "err", err)
|
||||
frame.AppendNotices(data.Notice{Text: "Failed to resample dataframe", Severity: data.NoticeSeverityWarning})
|
||||
}
|
||||
if err := trim(frame, *qm); err != nil {
|
||||
e.log.Error("Failed to trim dataframe", "err", err)
|
||||
frame.AppendNotices(data.Notice{Text: "Failed to trim dataframe", Severity: data.NoticeSeverityWarning})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user