Skip to content

Commit

Permalink
Issue duckdb#12600: Streaming Positive LEAD
Browse files Browse the repository at this point in the history
Fix tidy issue with abs.
  • Loading branch information
Richard Wesley committed Jun 25, 2024
1 parent 2277343 commit 0fb6173
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,11 @@ class StreamingWindowState : public OperatorState {
offset = bigint_value.GetValue<int64_t>();
}

// We can only support negative LEAD values and positive LAG values
// We can only support LEAD and LAG values within one standard vector
if (wexpr.type == ExpressionType::WINDOW_LEAD) {
offset = -offset;
}
return idx_t(abs(offset)) < MAX_BUFFER;
return idx_t(std::abs(offset)) < MAX_BUFFER;
}

static bool ComputeDefault(ClientContext &context, BoundWindowExpression &wexpr, Value &result) {
Expand Down

0 comments on commit 0fb6173

Please sign in to comment.