Skip to content

Commit

Permalink
Merge 577f3e8 into blathers/backport-release-24.3-136015
Browse files Browse the repository at this point in the history
  • Loading branch information
blathers-crl[bot] authored Nov 22, 2024
2 parents 86f0001 + 577f3e8 commit 0272300
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/sql/stats/histogram.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ package stats

import (
"context"
"encoding/hex"
"fmt"
"math"
"sort"
Expand Down Expand Up @@ -135,6 +136,12 @@ func DecodeUpperBound(
} else {
datum, _, err = keyside.Decode(a, typ, upperBound, encoding.Ascending)
}
if err != nil {
err = errors.Wrapf(
err, "decoding histogram version %d type %v value %v",
int(version), typ.Family().Name(), hex.EncodeToString(upperBound),
)
}
return datum, err
}

Expand Down
3 changes: 3 additions & 0 deletions pkg/util/encoding/encoding.go
Original file line number Diff line number Diff line change
Expand Up @@ -3162,6 +3162,9 @@ func DecodeUUIDValue(b []byte) (remaining []byte, u uuid.UUID, err error) {

// DecodeUntaggedUUIDValue decodes a value encoded by EncodeUntaggedUUIDValue.
func DecodeUntaggedUUIDValue(b []byte) (remaining []byte, u uuid.UUID, err error) {
if len(b) < uuidValueEncodedLength {
return b, uuid.UUID{}, errors.Errorf("invalid uuid length of %d", len(b))
}
u, err = uuid.FromBytes(b[:uuidValueEncodedLength])
if err != nil {
return b, uuid.UUID{}, err
Expand Down

0 comments on commit 0272300

Please sign in to comment.