@@ -42,7 +42,7 @@ const char *mock_table_list[] = {"__mock_table_1", "__mock_table_2", "__mock_tab
42
42
" __mock_table_schedule_2022" , " __mock_table_schedule_2023" , " __mock_table_123" ,
43
43
" __mock_graph" ,
44
44
// For leaderboard Q1
45
- " __mock_t1_50k " , " __mock_t2_100k " , " __mock_t3_1k " ,
45
+ " __mock_t1 " ,
46
46
// For leaderboard Q2
47
47
" __mock_t4_1m" , " __mock_t5_1m" , " __mock_t6_1m" ,
48
48
// For leaderboard Q3
@@ -95,11 +95,15 @@ auto GetMockTableSchemaOf(const std::string &table) -> Schema {
95
95
return Schema{std::vector{Column{" number" , TypeId::INTEGER}}};
96
96
}
97
97
98
- if (table == " __mock_t1_50k" || table == " __mock_t2_100k" || table == " __mock_t3_1k" || table == " __mock_t4_1m" ||
99
- table == " __mock_t5_1m" || table == " __mock_t6_1m" ) {
98
+ if (table == " __mock_t4_1m" || table == " __mock_t5_1m" || table == " __mock_t6_1m" ) {
100
99
return Schema{std::vector{Column{" x" , TypeId::INTEGER}, Column{" y" , TypeId::INTEGER}}};
101
100
}
102
101
102
+ if (table == " __mock_t1" ) {
103
+ return Schema{
104
+ std::vector{Column{" x" , TypeId::INTEGER}, Column{" y" , TypeId::INTEGER}, Column{" z" , TypeId::INTEGER}}};
105
+ }
106
+
103
107
if (table == " __mock_t7" ) {
104
108
return Schema{
105
109
std::vector{Column{" v" , TypeId::INTEGER}, Column{" v1" , TypeId::INTEGER}, Column{" v2" , TypeId::INTEGER}}};
@@ -159,16 +163,8 @@ auto GetSizeOf(const MockScanPlanNode *plan) -> size_t {
159
163
return 3 ;
160
164
}
161
165
162
- if (table == " __mock_t1_50k" ) {
163
- return 50000 ;
164
- }
165
-
166
- if (table == " __mock_t2_100k" ) {
167
- return 100000 ;
168
- }
169
-
170
- if (table == " __mock_t3_1k" ) {
171
- return 1000 ;
166
+ if (table == " __mock_t1" ) {
167
+ return 1000000 ;
172
168
}
173
169
174
170
if (table == " __mock_t4_1m" || table == " __mock_t5_1m" || table == " __mock_t6_1m" ) {
@@ -189,7 +185,7 @@ auto GetSizeOf(const MockScanPlanNode *plan) -> size_t {
189
185
auto GetShuffled (const MockScanPlanNode *plan) -> bool {
190
186
const auto &table = plan->GetTable ();
191
187
192
- if (table == " __mock_t1_50k " ) {
188
+ if (table == " __mock_t1 " ) {
193
189
return true ;
194
190
}
195
191
@@ -332,29 +328,12 @@ auto GetFunctionOf(const MockScanPlanNode *plan) -> std::function<Tuple(size_t)>
332
328
};
333
329
}
334
330
335
- if (table == " __mock_t1_50k" ) {
336
- return [plan](size_t cursor) {
337
- std::vector<Value> values{};
338
- values.push_back (ValueFactory::GetIntegerValue (cursor * 10 ));
339
- values.push_back (ValueFactory::GetIntegerValue (cursor * 1000 ));
340
- return Tuple{values, &plan->OutputSchema ()};
341
- };
342
- }
343
-
344
- if (table == " __mock_t2_100k" ) {
331
+ if (table == " __mock_t1" ) {
345
332
return [plan](size_t cursor) {
346
333
std::vector<Value> values{};
334
+ values.push_back (ValueFactory::GetIntegerValue (cursor / 10000 ));
335
+ values.push_back (ValueFactory::GetIntegerValue (cursor % 10000 ));
347
336
values.push_back (ValueFactory::GetIntegerValue (cursor));
348
- values.push_back (ValueFactory::GetIntegerValue (cursor * 100 ));
349
- return Tuple{values, &plan->OutputSchema ()};
350
- };
351
- }
352
-
353
- if (table == " __mock_t3_1k" ) {
354
- return [plan](size_t cursor) {
355
- std::vector<Value> values{};
356
- values.push_back (ValueFactory::GetIntegerValue (cursor * 100 ));
357
- values.push_back (ValueFactory::GetIntegerValue (cursor * 10000 ));
358
337
return Tuple{values, &plan->OutputSchema ()};
359
338
};
360
339
}
0 commit comments