mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-31 15:06:26 +00:00
wip
This commit is contained in:
parent
b1df5ce183
commit
1225ed591b
2 changed files with 7 additions and 2 deletions
|
@ -534,6 +534,11 @@ func sortBlockLess(shardA *pipeSortProcessorShard, rowIdxA int, shardB *pipeSort
|
||||||
cB := &bB.byColumns[idx]
|
cB := &bB.byColumns[idx]
|
||||||
bf := byFields[idx]
|
bf := byFields[idx]
|
||||||
|
|
||||||
|
if cA.c.isConst && cB.c.isConst {
|
||||||
|
// Fast path - compare const values
|
||||||
|
return cA.c.encodedValues[0] < cB.c.encodedValues[0]
|
||||||
|
}
|
||||||
|
|
||||||
if cA.c.isTime && cB.c.isTime {
|
if cA.c.isTime && cB.c.isTime {
|
||||||
// Fast path - sort by _time
|
// Fast path - sort by _time
|
||||||
tA := bA.br.timestamps[rrA.rowIdx]
|
tA := bA.br.timestamps[rrA.rowIdx]
|
||||||
|
|
|
@ -189,8 +189,8 @@ func getEmptyStrings(rowsCount int) []string {
|
||||||
}
|
}
|
||||||
values := *p
|
values := *p
|
||||||
if n := rowsCount - cap(values); n > 0 {
|
if n := rowsCount - cap(values); n > 0 {
|
||||||
values = append(values[:cap(values)], make([]string, n)...)
|
valuesNew := append(values[:cap(values)], make([]string, n)...)
|
||||||
emptyStrings.Store(&values)
|
emptyStrings.Store(&valuesNew)
|
||||||
}
|
}
|
||||||
return values[:rowsCount]
|
return values[:rowsCount]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue