@@ -162,10 +162,7 @@ Y_UNIT_TEST_SUITE(KqpQueryPerf) {
162
162
WHERE Key = $key;
163
163
)" ), params);
164
164
165
- if (QueryService) {
166
- // TODO: Fix QS.
167
- return ;
168
- }
165
+ // Cerr << stats.query_plan() << Endl;
169
166
170
167
UNIT_ASSERT_VALUES_EQUAL (stats.query_phases ().size (), 1 );
171
168
UNIT_ASSERT_VALUES_EQUAL (stats.query_phases (0 ).affected_shards (), 1 );
@@ -208,16 +205,12 @@ Y_UNIT_TEST_SUITE(KqpQueryPerf) {
208
205
209
206
// Cerr << stats.query_plan() << Endl;
210
207
211
- if (QueryService) {
212
- // TODO: Fix QS.
213
- return ;
214
- }
215
-
216
208
AssertTableStats (stats, " /Root/Join1" , {
217
209
.ExpectedReads = 3 ,
218
210
});
219
211
220
- UNIT_ASSERT_VALUES_EQUAL (stats.query_phases ().size (), 2 ); // Precompute limit Min(1001,$limit),
212
+ // For data query, additional precompute for LIMIT: Min(1001,$limit)
213
+ UNIT_ASSERT_VALUES_EQUAL (stats.query_phases ().size (), QueryService ? 1 : 2 );
221
214
for (const auto & phase : stats.query_phases ()) {
222
215
UNIT_ASSERT (phase.affected_shards () <= 1 );
223
216
}
@@ -226,15 +219,16 @@ Y_UNIT_TEST_SUITE(KqpQueryPerf) {
226
219
NJson::ReadJsonTree (stats.query_plan (), &plan, true );
227
220
228
221
auto stages = FindPlanStages (plan);
229
- UNIT_ASSERT_VALUES_EQUAL (stages.size (), 4 );
222
+ // TODO: Should be 2/3 stages?
223
+ UNIT_ASSERT_VALUES_EQUAL (stages.size (), QueryService ? 3 : 4 );
230
224
231
225
i64 totalTasks = 0 ;
232
226
for (const auto & stage : stages) {
233
227
if (stage.GetMapSafe ().contains (" Stats" )) {
234
228
totalTasks += stage.GetMapSafe ().at (" Stats" ).GetMapSafe ().at (" Tasks" ).GetIntegerSafe ();
235
229
}
236
230
}
237
- UNIT_ASSERT_VALUES_EQUAL (totalTasks, 3 );
231
+ UNIT_ASSERT_VALUES_EQUAL (totalTasks, QueryService ? 2 : 3 );
238
232
}
239
233
240
234
Y_UNIT_TEST_TWIN (RangeRead, QueryService) {
@@ -257,11 +251,6 @@ Y_UNIT_TEST_SUITE(KqpQueryPerf) {
257
251
258
252
// Cerr << stats.query_plan() << Endl;
259
253
260
- if (QueryService) {
261
- // TODO: Fix QS.
262
- return ;
263
- }
264
-
265
254
AssertTableStats (stats, " /Root/Join1" , {
266
255
.ExpectedReads = 5 ,
267
256
});
@@ -281,7 +270,10 @@ Y_UNIT_TEST_SUITE(KqpQueryPerf) {
281
270
totalTasks += stage.GetMapSafe ().at (" Stats" ).GetMapSafe ().at (" Tasks" ).GetIntegerSafe ();
282
271
}
283
272
}
284
- UNIT_ASSERT_VALUES_EQUAL (totalTasks, 2 );
273
+
274
+ // Not implicit limit (1000 rows) for QueryService means no sequential reads.
275
+ // TODO: Consider enabling sequential reads even without rows limit.
276
+ UNIT_ASSERT_VALUES_EQUAL (totalTasks, QueryService ? 3 : 2 );
285
277
}
286
278
287
279
Y_UNIT_TEST_QUAD (IndexLookupJoin, EnableStreamLookup, QueryService) {
@@ -315,11 +307,6 @@ Y_UNIT_TEST_SUITE(KqpQueryPerf) {
315
307
[[9];[101u];["Two"]]
316
308
])" , FormatResultSetYson (results[0 ]));
317
309
318
- if (QueryService) {
319
- // TODO: Fix QS.
320
- return ;
321
- }
322
-
323
310
AssertTableStats (stats, " /Root/Join1" , {
324
311
.ExpectedReads = 9 ,
325
312
});
@@ -473,11 +460,6 @@ Y_UNIT_TEST_SUITE(KqpQueryPerf) {
473
460
WHERE Key = $key;
474
461
)" ), params);
475
462
476
- if (QueryService) {
477
- // TODO: Fix QS.
478
- return ;
479
- }
480
-
481
463
AssertTableStats (stats, " /Root/EightShard" , {
482
464
.ExpectedReads = 1 ,
483
465
.ExpectedUpdates = 1 ,
@@ -506,11 +488,6 @@ Y_UNIT_TEST_SUITE(KqpQueryPerf) {
506
488
WHERE Key = $key AND Text = $text;
507
489
)" ), params);
508
490
509
- if (QueryService) {
510
- // TODO: Fix QS.
511
- return ;
512
- }
513
-
514
491
AssertTableStats (stats, " /Root/EightShard" , {
515
492
.ExpectedReads = 1 ,
516
493
.ExpectedDeletes = 1 ,
@@ -656,11 +633,6 @@ Y_UNIT_TEST_SUITE(KqpQueryPerf) {
656
633
WHERE t1.Key = $key;
657
634
)" ), params);
658
635
659
- if (QueryService) {
660
- // TODO: Fix QS.
661
- return ;
662
- }
663
-
664
636
if (settings.AppConfig .GetTableServiceConfig ().GetEnableKqpDataQueryStreamLookup ()) {
665
637
UNIT_ASSERT_VALUES_EQUAL (stats.query_phases ().size (), 3 );
666
638
} else {
0 commit comments