From 17026756a5dfd94c8022bfa68edb13370afef391 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Thu, 16 May 2024 00:11:49 +0200 Subject: [PATCH] wip --- lib/logstorage/block_result.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/logstorage/block_result.go b/lib/logstorage/block_result.go index 1c16b85a5..ee0b06aeb 100644 --- a/lib/logstorage/block_result.go +++ b/lib/logstorage/block_result.go @@ -1307,8 +1307,10 @@ func (br *blockResult) skipRows(skipRows int) { if c.isConst { continue } - if c.valuesEncoded != nil { - c.valuesEncoded = append(c.valuesEncoded[:0], c.valuesEncoded[skipRows:]...) + + valuesEncoded := c.getValuesEncoded(br) + if valuesEncoded != nil { + c.valuesEncoded = append(valuesEncoded[:0], valuesEncoded[skipRows:]...) } if c.valuesBucketed != nil { c.valuesBucketed = append(c.valuesBucketed[:0], c.valuesBucketed[skipRows:]...) @@ -1325,8 +1327,10 @@ func (br *blockResult) truncateRows(keepRows int) { if c.isConst { continue } - if c.valuesEncoded != nil { - c.valuesEncoded = c.valuesEncoded[:keepRows] + + valuesEncoded := c.getValuesEncoded(br) + if valuesEncoded != nil { + c.valuesEncoded = valuesEncoded[:keepRows] } if c.valuesBucketed != nil { c.valuesBucketed = append(c.valuesBucketed[:0], c.valuesBucketed[keepRows:]...)