diff --git a/extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/indexing/MSQWorkerTask.java b/extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/indexing/MSQWorkerTask.java index d0dd70b0dd9..95abc6b03a6 100644 --- a/extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/indexing/MSQWorkerTask.java +++ b/extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/indexing/MSQWorkerTask.java @@ -154,6 +154,14 @@ public class MSQWorkerTask extends AbstractTask return getContextValue(Tasks.PRIORITY_KEY, Tasks.DEFAULT_BATCH_INDEX_TASK_PRIORITY); } + @Override + public boolean supportsQueries() + { + // Even though we don't have a QueryResource, we do embed a query stack, and so we need preloaded resources + // such as broadcast tables. + return true; + } + @Override public boolean equals(Object o) { diff --git a/indexing-service/src/main/java/org/apache/druid/indexing/common/task/Task.java b/indexing-service/src/main/java/org/apache/druid/indexing/common/task/Task.java index 1cc2d329c88..5c3186ef392 100644 --- a/indexing-service/src/main/java/org/apache/druid/indexing/common/task/Task.java +++ b/indexing-service/src/main/java/org/apache/druid/indexing/common/task/Task.java @@ -182,7 +182,12 @@ public interface Task QueryRunner getQueryRunner(Query query); /** - * @return true if this Task type is queryable, such as streaming ingestion tasks + * True if this task type embeds a query stack, and therefore should preload resources (like broadcast tables) + * that may be needed by queries. + * + * If true, {@link #getQueryRunner(Query)} does not necessarily return nonnull query runners. For example, + * MSQWorkerTask returns true from this method (because it embeds a query stack for running multi-stage queries) + * even though it is not directly queryable via HTTP. */ boolean supportsQueries();