From 1834c68250bf9403b8da920071e78583bba9b900 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Tue, 14 May 2024 02:03:59 +0200 Subject: [PATCH] lib/logstorage/pipe_sort.go: wip --- lib/logstorage/pipe_sort.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/logstorage/pipe_sort.go b/lib/logstorage/pipe_sort.go index 783c638e8..aee2028cf 100644 --- a/lib/logstorage/pipe_sort.go +++ b/lib/logstorage/pipe_sort.go @@ -583,7 +583,10 @@ func sortBlockLess(shardA *pipeSortProcessorShard, rowIdxA int, shardB *pipeSort if ccA == ccB { continue } - return cA.c.encodedValues[0] < cB.c.encodedValues[0] + if isDesc { + return ccB < ccA + } + return ccA < ccB } if cA.c.isTime && cB.c.isTime {