Skip to content

Commit 8f777ea

Browse files
authored
one more fix to query parameter types handling (#17011)
1 parent 6853d24 commit 8f777ea

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

ydb/tools/query_replay_yt/query_compiler.cpp

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -312,33 +312,37 @@ class TReplayCompileActor: public TActorBootstrapped<TReplayCompileActor> {
312312

313313
private:
314314

315+
TKqpQueryRef MakeQueryRef() {
316+
return TKqpQueryRef(Query->Text, Query->QueryParameterTypes);
317+
}
318+
315319
void StartCompilation() {
316320
IKqpHost::TPrepareSettings prepareSettings;
317321
prepareSettings.DocumentApiRestricted = false;
318322

319323
switch (Query->Settings.QueryType) {
320324
case NKikimrKqp::QUERY_TYPE_SQL_DML:
321-
AsyncCompileResult = KqpHost->PrepareDataQuery(Query->Text, prepareSettings);
325+
AsyncCompileResult = KqpHost->PrepareDataQuery(MakeQueryRef(), prepareSettings);
322326
break;
323327

324328
case NKikimrKqp::QUERY_TYPE_AST_DML:
325-
AsyncCompileResult = KqpHost->PrepareDataQueryAst(Query->Text, prepareSettings);
329+
AsyncCompileResult = KqpHost->PrepareDataQueryAst(MakeQueryRef(), prepareSettings);
326330
break;
327331

328332
case NKikimrKqp::QUERY_TYPE_SQL_SCAN:
329333
case NKikimrKqp::QUERY_TYPE_AST_SCAN:
330-
AsyncCompileResult = KqpHost->PrepareScanQuery(Query->Text, Query->IsSql(), prepareSettings);
334+
AsyncCompileResult = KqpHost->PrepareScanQuery(MakeQueryRef(), Query->IsSql(), prepareSettings);
331335
break;
332336
case NKikimrKqp::QUERY_TYPE_SQL_GENERIC_SCRIPT:
333-
AsyncCompileResult = KqpHost->PrepareGenericScript(Query->Text, prepareSettings);
337+
AsyncCompileResult = KqpHost->PrepareGenericScript(MakeQueryRef(), prepareSettings);
334338
break;
335339
case NKikimrKqp::QUERY_TYPE_SQL_GENERIC_QUERY: {
336340
prepareSettings.ConcurrentResults = false;
337-
AsyncCompileResult = KqpHost->PrepareGenericQuery(Query->Text, prepareSettings, nullptr);
341+
AsyncCompileResult = KqpHost->PrepareGenericQuery(MakeQueryRef(), prepareSettings, nullptr);
338342
break;
339343
}
340344
case NKikimrKqp::QUERY_TYPE_SQL_GENERIC_CONCURRENT_QUERY: {
341-
AsyncCompileResult = KqpHost->PrepareGenericQuery(Query->Text, prepareSettings, nullptr);
345+
AsyncCompileResult = KqpHost->PrepareGenericQuery(MakeQueryRef(), prepareSettings, nullptr);
342346
break;
343347
}
344348

0 commit comments

Comments
 (0)