chore: Fix Loki arm builds (#15936)

Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
pull/15935/head^2
Christian Haudum 1 year ago committed by GitHub
parent c9d899ce4a
commit ed863fe1be
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      pkg/dataobj/internal/dataset/dataset_iter.go
  2. 6
      pkg/dataobj/internal/dataset/value_encoding_bitmap.go

@ -2,7 +2,6 @@ package dataset
import (
"context"
"math"
"github.com/grafana/loki/v3/pkg/dataobj/internal/result"
)
@ -26,7 +25,7 @@ func Iter(ctx context.Context, columns []Column) result.Seq[Row] {
// more efficient implementation is needed for reading Datasets backed by
// object storage.
totalRows := math.MinInt64
var totalRows int
for _, col := range columns {
totalRows = max(totalRows, col.ColumnInfo().RowsCount)
}

@ -364,7 +364,7 @@ type bitpackBuffer struct {
width int
sets int // Number of encoded sets. Each set has 8 elements.
sets uint64 // Number of encoded sets. Each set has 8 elements.
data []byte // Total amount of data.
}
@ -409,7 +409,7 @@ func (b *bitpackBuffer) Flush(w streamio.Writer) error {
//
// To encode the width in 6 bits, we encode width-1. That reserves the bottom
// 7 bits for metadata, and the remaining 57 bits for the number of sets.
const maxSets = 1<<57 - 1
const maxSets uint64 = 1<<57 - 1
// Validate constraints for safety.
switch {
@ -423,7 +423,7 @@ func (b *bitpackBuffer) Flush(w streamio.Writer) error {
// Width can be between 1 and 64. To pack it into 6 bits, we subtract 1 from
// the value.
header := (uint64(b.sets) << 7) | (uint64(b.width-1) << 1) | 1
header := (b.sets << 7) | (uint64(b.width-1) << 1) | 1
if err := streamio.WriteUvarint(w, header); err != nil {
return err
}

Loading…
Cancel
Save