From ad2b1f5803099edeae9fc5e94e29cb4ded6dadf0 Mon Sep 17 00:00:00 2001 From: Finn Carroll Date: Mon, 1 Jun 2026 23:00:19 -0700 Subject: [PATCH] Use Object type for queryCtx parameter in AnalyticsExecutionEngine MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The QueryRequestContext class lives in analytics-engine (plugin) not analytics-api (library). The core module only depends on analytics-api at compile time, so referencing QueryRequestContext directly causes compilation failures when the published analytics-api SNAPSHOT does not include it. Since QueryPlanExecutor.execute() takes Object as the context parameter anyway, just use Object here. The value is passed through opaquely — no type-specific operations are performed on it. Signed-off-by: Finn Carroll --- .../executor/analytics/AnalyticsExecutionEngine.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/core/src/main/java/org/opensearch/sql/executor/analytics/AnalyticsExecutionEngine.java b/core/src/main/java/org/opensearch/sql/executor/analytics/AnalyticsExecutionEngine.java index 733c603a76..ad39a025f4 100644 --- a/core/src/main/java/org/opensearch/sql/executor/analytics/AnalyticsExecutionEngine.java +++ b/core/src/main/java/org/opensearch/sql/executor/analytics/AnalyticsExecutionEngine.java @@ -82,15 +82,14 @@ public void execute( } /** - * Overload that threads a {@link org.opensearch.analytics.QueryRequestContext} snapshot down to - * the analytics-engine's plan executor via {@link - * org.opensearch.analytics.exec.QueryPlanExecutor}'s opaque context slot. The snapshot is - * captured once at query entry so planner and executor see the same cluster state. + * Overload that threads a QueryRequestContext snapshot down to the analytics-engine's plan + * executor via {@link org.opensearch.analytics.exec.QueryPlanExecutor}'s opaque context slot. The + * snapshot is captured once at query entry so planner and executor see the same cluster state. */ public void execute( RelNode plan, CalcitePlanContext context, - org.opensearch.analytics.QueryRequestContext queryCtx, + Object queryCtx, ResponseListener listener) { // QueryPlanExecutor became asynchronous in analytics-framework 3.7 — execution is dispatched // to a worker pool and results arrive on the listener. Record the execute metric in the @@ -153,7 +152,7 @@ public void explain( public void executeWithProfile( RelNode plan, CalcitePlanContext context, - org.opensearch.analytics.QueryRequestContext queryCtx, + Object queryCtx, ResponseListener listener) { planExecutor.executeWithProfile(