diff --git a/pkg/storage/lazyquery/lazyquery.go b/pkg/storage/lazyquery/lazyquery.go index 1e7918d8c33..33e901cfaa8 100644 --- a/pkg/storage/lazyquery/lazyquery.go +++ b/pkg/storage/lazyquery/lazyquery.go @@ -61,6 +61,9 @@ func (l LazyQuerier) Select(ctx context.Context, selectSorted bool, params *stor } func copyParams(params *storage.SelectHints) *storage.SelectHints { + if params == nil { + return nil + } copiedParams := *params copiedParams.Grouping = slices.Clone(params.Grouping)