abhishekrb19 commented on code in PR #19069:
URL: https://github.com/apache/druid/pull/19069#discussion_r2875180189
##########
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:
I see that
https://github.com/apache/druid/blob/master/web-console/src/views/explore-view/explore-view.tsx#L64
directly calls the `/druid/v2/sql` endpoint without invoking
`queryDruidSql`. Should we update it to use this function instead, so the
context is appended for the Explore view as well?
--
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]