From 14c2e84bd1eb126034afad68c0adfbee0a17e6db Mon Sep 17 00:00:00 2001 From: PHILO-HE Date: Tue, 10 Dec 2024 23:51:16 +0800 Subject: [PATCH] Adjust for preceding --- velox/exec/WindowPartition.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/velox/exec/WindowPartition.cpp b/velox/exec/WindowPartition.cpp index 19f33812ed548..3ca765623c600 100644 --- a/velox/exec/WindowPartition.cpp +++ b/velox/exec/WindowPartition.cpp @@ -426,9 +426,7 @@ void WindowPartition::updateKRangeFrameBounds( mappedFrameColumn, flags); if (compareResult <= 0) { - start = lastFoundIndex == -1 - ? 0 - : std::min(lastFoundIndex, numRows - 1); + start = lastFoundIndex == -1 ? 0 : lastFoundIndex; } else { start = 0; }