This commit is contained in:
Aliaksandr Valialkin 2024-05-16 00:11:49 +02:00
parent 0d71dc22ca
commit 17026756a5
No known key found for this signature in database
GPG key ID: 52C003EE2BCDB9EB

View file

@ -1307,8 +1307,10 @@ func (br *blockResult) skipRows(skipRows int) {
if c.isConst { if c.isConst {
continue 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 { if c.valuesBucketed != nil {
c.valuesBucketed = append(c.valuesBucketed[:0], c.valuesBucketed[skipRows:]...) c.valuesBucketed = append(c.valuesBucketed[:0], c.valuesBucketed[skipRows:]...)
@ -1325,8 +1327,10 @@ func (br *blockResult) truncateRows(keepRows int) {
if c.isConst { if c.isConst {
continue 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 { if c.valuesBucketed != nil {
c.valuesBucketed = append(c.valuesBucketed[:0], c.valuesBucketed[keepRows:]...) c.valuesBucketed = append(c.valuesBucketed[:0], c.valuesBucketed[keepRows:]...)