Skip to content

Commit

Permalink
Fix comment
Browse files Browse the repository at this point in the history
  • Loading branch information
PHILO-HE committed Mar 20, 2024
1 parent 3752d77 commit 71b4fe9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions velox/exec/Window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -312,9 +312,9 @@ void Window::updateKRowsFrameBounds(

if (isKPreceding) {
if (startValue < INT32_MIN) {
// Overflow happens for certain number of preceding rows. Moreover,
// considering partition size cannot be larger than INT32_MAX to produce
// positive value as upper bound, we directly use 0 for all rows.
// For overflow in kPreceding frames, k < INT32_MIN. Since the max
// number of rows in a partition is INT32_MAX, the frameBound will
// always be bound to the first row of the partition
std::fill_n(rawFrameBounds, numRows, 0);
return;
}
Expand Down
10 changes: 5 additions & 5 deletions velox/functions/prestosql/window/tests/AggregateWindowTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,14 +216,14 @@ TEST_F(AggregateWindowTest, integerOverflowRowsFrame) {
2147483645});
auto c3 = makeFlatVector<int64_t>(
{2147483651,
1,
2147483650,
2147483649,
10,
2147483648,
2147483647,
21474836,
2147483650,
2,
2147483646,
2147483650,
2147483649,
2147483648});
auto input = makeRowVector({c0, c1, c2, c3});
std::string overClause = "partition by c0 order by c1 desc";
Expand Down Expand Up @@ -268,7 +268,7 @@ TEST_F(AggregateWindowTest, integerOverflowRowsFrame) {
c1,
c2,
c3,
makeFlatVector<int64_t>({6, 5, 4, 3, 2, 1, 4, 3, 2, 1})});
makeFlatVector<int64_t>({6, 2, 4, 3, 2, 1, 3, 3, 2, 1})});
WindowTestBase::testWindowFunction(
{input}, "count(c1)", overClause, frameClause, expected);

Expand Down

0 comments on commit 71b4fe9

Please sign in to comment.