From d08dfd8752031d582ab49a8b089667f2ed06cf56 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Fri, 17 May 2024 14:25:54 +0200 Subject: [PATCH] wip --- lib/logstorage/block_result.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/logstorage/block_result.go b/lib/logstorage/block_result.go index d73df433a..62f59c316 100644 --- a/lib/logstorage/block_result.go +++ b/lib/logstorage/block_result.go @@ -149,6 +149,10 @@ func (br *blockResult) initFromNeededColumns(brSrc *blockResult, bm *bitmap, nee // cloneValues clones the given values into br and returns the cloned values. func (br *blockResult) cloneValues(values []string) []string { + if values == nil { + return nil + } + valuesBufLen := len(br.valuesBuf) for _, v := range values { br.addValue(v) @@ -1494,7 +1498,7 @@ func (c *blockResultColumn) getValueAtRow(br *blockResult, rowIdx int) string { return values[rowIdx] } -// getValues returns values for the given column, bucketed according to bf. +// getValuesBucketed returns values for the given column, bucketed according to bf. // // The returned values are valid until br.reset() is called. func (c *blockResultColumn) getValuesBucketed(br *blockResult, bf *byStatsField) []string {