@@ -94,6 +94,10 @@ static TKikimrRunner GetKikimrWithJoinSettings(bool useStreamLookupJoin = false,
94
94
return TKikimrRunner (serverSettings);
95
95
}
96
96
97
+ void PrintPlan (const TString& plan) {
98
+ Cout << plan << Endl;
99
+ }
100
+
97
101
class TChainTester {
98
102
public:
99
103
TChainTester (size_t chainSize)
@@ -158,9 +162,10 @@ class TChainTester {
158
162
);
159
163
}
160
164
161
- auto result = Session.ExecuteDataQuery (joinRequest, TTxControl::BeginTx (). CommitTx () ).ExtractValueSync ();
165
+ auto result = Session.ExplainDataQuery (joinRequest).ExtractValueSync ();
162
166
result.GetIssues ().PrintTo (Cerr);
163
167
UNIT_ASSERT_VALUES_EQUAL (result.GetStatus (), EStatus::SUCCESS);
168
+ PrintPlan (result.GetPlan ());
164
169
}
165
170
166
171
TKikimrRunner Kikimr;
@@ -208,28 +213,8 @@ void ExecuteJoinOrderTestDataQuery(const TString& queryPath, bool useStreamLooku
208
213
}
209
214
210
215
Y_UNIT_TEST_SUITE (KqpJoinOrder) {
211
- // Y_UNIT_TEST(Chain65Nodes) {
212
- // TChainTester(65).Test();
213
- // }
214
-
215
- TString ExecuteJoinOrderTestDataQueryWithStats (const TString& queryPath, const TString& statsPath, bool useStreamLookupJoin, bool useColumnStore) {
216
- auto kikimr = GetKikimrWithJoinSettings (useStreamLookupJoin, GetStatic (statsPath));
217
- auto db = kikimr.GetTableClient ();
218
- auto session = db.CreateSession ().GetValueSync ().GetSession ();
219
-
220
- CreateSampleTable (session, useColumnStore);
221
-
222
- /* join with parameters */
223
- {
224
- const TString query = GetStatic (queryPath);
225
-
226
- auto execRes = db.StreamExecuteScanQuery (query, TStreamExecScanQuerySettings ().Explain (true )).ExtractValueSync ();
227
- execRes.GetIssues ().PrintTo (Cerr);
228
- UNIT_ASSERT_VALUES_EQUAL (execRes.GetStatus (), EStatus::SUCCESS);
229
- auto plan = CollectStreamResult (execRes).PlanJson ;
230
- Cerr << plan.GetRef ();
231
- return plan.GetRef ();
232
- }
216
+ Y_UNIT_TEST (Chain65Nodes) {
217
+ TChainTester (65 ).Test ();
233
218
}
234
219
235
220
void CheckJoinCardinality (const TString& queryPath, const TString& statsPath, const TString& joinKind, double card, bool useStreamLookupJoin, bool useColumnStore) {
0 commit comments