Skip to content

Commit

Permalink
[api] fix point query
Browse files Browse the repository at this point in the history
  • Loading branch information
nevgeny committed Sep 1, 2023
1 parent 9123f49 commit c1431a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/api/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -2703,7 +2703,7 @@ func (h *Handler) handleGetPoint(ctx context.Context, ai accessInfo, opt seriesR

rows := ixToRow[ix]
row := rows[0]
value := math.Abs(selectPointValue(q.what, req.maxHost, &row))
value := selectPointValue(q.what, req.maxHost, &row)
if showMaxHost && row.maxHost != 0 {
// mapping every time is not optimal, but mapping to store in cache is also not optimal. TODO - optimize?
label, err := h.getTagValue(row.maxHost)
Expand Down Expand Up @@ -3331,6 +3331,7 @@ func (h *Handler) loadPoint(ctx context.Context, pq *preparedPointsQuery, pointQ
ret := make([]pSelectRow, 0)
rows := 0
cols := newPointsSelectCols(args, false)
fmt.Println(*cols)
isFast := pointQuery.isFast()
isLight := pq.isLight()
metric := pq.metricID
Expand All @@ -3347,7 +3348,6 @@ func (h *Handler) loadPoint(ctx context.Context, pq *preparedPointsQuery, pointQ
}
}()
for i := 0; i < block.Rows; i++ {
//todo check
replaceInfNan(&cols.cnt[i])
for j := 0; j < len(cols.val); j++ {
replaceInfNan(&cols.val[j][i])
Expand Down

0 comments on commit c1431a1

Please sign in to comment.