Skip to content

Commit

Permalink
cloudcheck: don't reuse slice
Browse files Browse the repository at this point in the history
Release note: none.
Epic: none.
  • Loading branch information
dt committed Feb 24, 2023
1 parent dda41f8 commit dfe830c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/cloud/cloudcheck/cloudcheck_stmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ func ShowCloudStorageTestPlanHook(
}
rowResultWriter := sql.NewCallbackResultWriter(func(ctx context.Context, row tree.Datums) error {
// collapse the two pairs of bytes+time to a single string rate each.
res := row[:len(row)-2] //
res := make(tree.Datums, len(row)-2)
copy(res[:4], row[:4])
res[4] = tree.NewDString(rateFromDatums(row[4], row[5]))
res[5] = tree.NewDString(rateFromDatums(row[6], row[7]))
res[6] = row[8]
Expand Down

0 comments on commit dfe830c

Please sign in to comment.