From c59f1adcc80d02a1e6a7d6feccbc7cf8aa1054ce Mon Sep 17 00:00:00 2001 From: Zoltan Haindrich Date: Wed, 17 Jul 2024 16:42:22 +0000 Subject: [PATCH] updates --- .../msq/exec/MSQDrillWindowQueryTest.java | 31 ++++++++++++------- .../decoupled.iq | 2 +- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/extensions-core/multi-stage-query/src/test/java/org/apache/druid/msq/exec/MSQDrillWindowQueryTest.java b/extensions-core/multi-stage-query/src/test/java/org/apache/druid/msq/exec/MSQDrillWindowQueryTest.java index fda8c1a669c..6b6387278da 100644 --- a/extensions-core/multi-stage-query/src/test/java/org/apache/druid/msq/exec/MSQDrillWindowQueryTest.java +++ b/extensions-core/multi-stage-query/src/test/java/org/apache/druid/msq/exec/MSQDrillWindowQueryTest.java @@ -116,7 +116,7 @@ public class MSQDrillWindowQueryTest extends DrillWindowQueryTest @Provides @MultiStageQuery @LazySingleton - public SqlStatementFactory makeNativeSqlStatementFactory( + public SqlStatementFactory makeMSQSqlStatementFactory( final MSQTaskSqlEngine sqlEngine, SqlToolbox toolbox ) @@ -129,18 +129,25 @@ public class MSQDrillWindowQueryTest extends DrillWindowQueryTest public MSQTaskSqlEngine createEngine( QueryLifecycleFactory qlf, ObjectMapper queryJsonMapper, - Injector injector + Injector injector, + MSQTestOverlordServiceClient indexingServiceClient ) { - final WorkerMemoryParameters workerMemoryParameters = - WorkerMemoryParameters.createInstance( - WorkerMemoryParameters.PROCESSING_MINIMUM_BYTES * 50, - 2, - 10, - 2, - 0, - 0 - ); + return new MSQTaskSqlEngine(indexingServiceClient, queryJsonMapper); + } + + @Provides + @LazySingleton + private MSQTestOverlordServiceClient extracted(ObjectMapper queryJsonMapper, Injector injector) + { + final WorkerMemoryParameters workerMemoryParameters = WorkerMemoryParameters.createInstance( + WorkerMemoryParameters.PROCESSING_MINIMUM_BYTES * 50, + 2, + 10, + 2, + 0, + 0 + ); final MSQTestOverlordServiceClient indexingServiceClient = new MSQTestOverlordServiceClient( queryJsonMapper, injector, @@ -148,7 +155,7 @@ public class MSQDrillWindowQueryTest extends DrillWindowQueryTest workerMemoryParameters, ImmutableList.of() ); - return new MSQTaskSqlEngine(indexingServiceClient, queryJsonMapper); + return indexingServiceClient; } @Provides diff --git a/extensions-core/multi-stage-query/src/test/quidem/org.apache.druid.msq.exec.MSQQuidemTest/decoupled.iq b/extensions-core/multi-stage-query/src/test/quidem/org.apache.druid.msq.exec.MSQQuidemTest/decoupled.iq index 285dc9cf3a8..a045326e319 100644 --- a/extensions-core/multi-stage-query/src/test/quidem/org.apache.druid.msq.exec.MSQQuidemTest/decoupled.iq +++ b/extensions-core/multi-stage-query/src/test/quidem/org.apache.druid.msq.exec.MSQQuidemTest/decoupled.iq @@ -10,7 +10,7 @@ order by 1; +--------------------------------------------+ | TASK | +--------------------------------------------+ -| query-eeb20bee-0a2a-4812-97d9-ae70a9107f80 | +| query-09ed2fdf-e74e-4d61-9a5b-b9ce4949aa48 | +--------------------------------------------+ (1 row)