From 6339cae5de671e5419a11f6e5bc345c88f83e91d Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Mon, 29 Apr 2024 03:22:27 +0200 Subject: [PATCH] wip --- lib/logstorage/pipes.go | 6 +++--- lib/logstorage/storage_search.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/logstorage/pipes.go b/lib/logstorage/pipes.go index 39eb09ef1..1364f2554 100644 --- a/lib/logstorage/pipes.go +++ b/lib/logstorage/pipes.go @@ -145,7 +145,7 @@ func (fpp *fieldsPipeProcessor) writeBlock(workerID uint, timestamps []int64, co brs := getBlockRows() cs := brs.cs for _, f := range fpp.fp.fields { - values := getValuesForBlockColumn(columns, f, len(timestamps)) + values := getBlockColumnValues(columns, f, len(timestamps)) cs = append(cs, BlockColumn{ Name: f, Values: values, @@ -352,7 +352,7 @@ func (spp *statsPipeProcessor) writeBlock(workerID uint, timestamps []int64, col } if len(byFields) == 1 { // Special case for grouping by a single column. - values := getValuesForBlockColumn(columns, byFields[0], len(timestamps)) + values := getBlockColumnValues(columns, byFields[0], len(timestamps)) if isConstValue(values) { // Fast path for column with constant value. shard.keyBuf = encoding.MarshalBytes(shard.keyBuf[:0], bytesutil.ToUnsafeBytes(values[0])) @@ -830,7 +830,7 @@ func getFieldsIgnoreStar(fields []string) []string { func appendBlockColumnValues(dst [][]string, columns []BlockColumn, fields []string, rowsCount int) [][]string { for _, f := range fields { - values := getValuesForBlockColumn(columns, f, rowsCount) + values := getBlockColumnValues(columns, f, rowsCount) dst = append(dst, values) } return dst diff --git a/lib/logstorage/storage_search.go b/lib/logstorage/storage_search.go index 804064ecc..46008c4fc 100644 --- a/lib/logstorage/storage_search.go +++ b/lib/logstorage/storage_search.go @@ -171,7 +171,7 @@ func getBlockColumnIndex(columns []BlockColumn, columnName string) int { return -1 } -func getValuesForBlockColumn(columns []BlockColumn, columnName string, rowsCount int) []string { +func getBlockColumnValues(columns []BlockColumn, columnName string, rowsCount int) []string { for _, c := range columns { if c.Name == columnName { return c.Values