mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-31 15:06:26 +00:00
wip
This commit is contained in:
parent
d9fdbf907c
commit
6339cae5de
2 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue