Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
PHILO-HE committed Feb 27, 2024
1 parent 86b4add commit 1c8ebac
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions velox/exec/Window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,16 @@ void Window::updateKRowsFrameBounds(
if (frameArg.index == kConstantChannel) {
auto constantOffset = frameArg.constant.value();
auto startValue =
startRow + (isKPreceding ? -constantOffset : constantOffset);
std::iota(rawFrameBounds, rawFrameBounds + numRows, startValue);
(isKPreceding ? -constantOffset : constantOffset) + startRow;
// std::iota(rawFrameBounds, rawFrameBounds + numRows, startValue);
for (int i = 0; i < numRows; i++) {
if (startValue != (int32_t)startValue) {
std::fill(rawFrameBounds + i, rawFrameBounds + numRows, startValue - 1);
} else {
*(rawFrameBounds + i) = startValue;
}
startValue = startValue + 1;
}
} else {
currentPartition_->extractColumn(
frameArg.index, partitionOffset_, numRows, 0, frameArg.value);
Expand Down

0 comments on commit 1c8ebac

Please sign in to comment.