Skip to content

Commit

Permalink
Project3 leaderboard: make it slower (#644)
Browse files Browse the repository at this point in the history
* make it slower

Signed-off-by: AveryQi115 <[email protected]>

* format

Signed-off-by: AveryQi115 <[email protected]>

---------

Signed-off-by: AveryQi115 <[email protected]>
  • Loading branch information
AveryQi115 authored Oct 31, 2023
1 parent cd34aec commit 4957075
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
5 changes: 3 additions & 2 deletions src/execution/mock_scan_executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ auto GetSizeOf(const MockScanPlanNode *plan) -> size_t {
}

if (table == "__mock_t9") {
return 1000000;
return 10000000;
}

return 0;
Expand Down Expand Up @@ -422,7 +422,8 @@ auto GetFunctionOf(const MockScanPlanNode *plan) -> std::function<Tuple(size_t)>
return [plan](size_t cursor) {
std::vector<Value> values{};
values.push_back(ValueFactory::GetIntegerValue(cursor / 10000));
values.push_back(ValueFactory::GetIntegerValue(cursor / 2 + ((cursor / 10000) % 2) * ((cursor / 2) % 2)));
values.push_back(
ValueFactory::GetIntegerValue(10000000 - (cursor / 2 + ((cursor / 10000) % 2) * ((cursor / 2) % 2))));
return Tuple{values, &plan->OutputSchema()};
};
}
Expand Down
20 changes: 10 additions & 10 deletions test/sql/p3.leaderboard-q1-window.slt
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ select * from (
) where rank <= 3
) order by y limit 10;
----
0 0
0 0
0 1
0 1
1 5000
1 5000
1 5002
1 5002
1 5002
1 5002
999 5000000
999 5000000
999 5000002
999 5000002
999 5000002
999 5000002
998 5005001
998 5005001
998 5005002
998 5005002

0 comments on commit 4957075

Please sign in to comment.