aho135 commented on code in PR #19069:
URL: https://github.com/apache/druid/pull/19069#discussion_r2886236323


##########
web-console/src/utils/druid-query.ts:
##########
@@ -341,7 +363,18 @@ export async function queryDruidSql<T = any>(
 ): Promise<T[]> {
   let sqlResultResp: AxiosResponse;
   try {
-    sqlResultResp = await Api.instance.post('/druid/v2/sql', sqlQueryPayload, 
{ signal });
+    // Inject brokerService into context if configured
+    const payload = consoleBrokerService
+      ? {
+          ...sqlQueryPayload,
+          context: {
+            ...sqlQueryPayload.context,
+            brokerService: consoleBrokerService,
+          },
+        }
+      : sqlQueryPayload;
+
+    sqlResultResp = await Api.instance.post('/druid/v2/sql', payload, { signal 
});

Review Comment:
   Thanks @abhishekrb19 this makes sense. Let me update the name to make clear 
that it is only for system queries



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to