Implementation:Apache Druid RunPanel
Appearance
| Knowledge Sources | |
|---|---|
| Domains | SQL_Querying, Performance_Tuning |
| Last Updated | 2026-02-10 00:00 GMT |
Overview
Concrete React component for configuring query execution context and triggering query execution in the Workbench.
Description
The RunPanel component (723 lines) renders the query execution controls in the Workbench toolbar. It provides:
- Engine selector: Dropdown to choose execution engine (native, sql-native, sql-msq-task, sql-msq-dart)
- Context menus: Popover menus for timezone, join algorithm, cache settings, and other context parameters
- Run button: Triggers query execution with the configured context
- Edit context dialog: JSON editor for advanced context customization
The component updates the WorkbenchQuery model with the selected context parameters.
Usage
Render this component in the Workbench query tab toolbar. It controls the execution parameters for the current query.
Code Reference
Source Location
- Repository: Apache Druid
- File: web-console/src/views/workbench-view/run-panel/run-panel.tsx
- Lines: L186-L723
Signature
interface RunPanelProps {
query: WorkbenchQuery;
onQueryChange(query: WorkbenchQuery): void;
running: boolean;
onRun(preview: boolean): void;
queryEngines: DruidEngine[];
clusterCapacity: number | undefined;
moreMenu?: JSX.Element;
}
export const RunPanel = React.memo(function RunPanel(
props: RunPanelProps,
): JSX.Element {
// 723-line component with engine selector, context menus, and run button
});
Import
import { RunPanel } from './run-panel/run-panel';
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| query | WorkbenchQuery | Yes | Current query with context settings |
| onQueryChange | callback | Yes | Called when context parameters are modified |
| running | boolean | Yes | Whether a query is currently executing |
| onRun | callback | Yes | Called when user clicks Run (preview: boolean) |
| queryEngines | DruidEngine[] | Yes | Available engines for the engine selector |
| clusterCapacity | number or undefined | No | Worker capacity for MSQ task slider |
Outputs
| Name | Type | Description |
|---|---|---|
| query | via callback | Updated WorkbenchQuery with modified queryContext |
| Run trigger | via callback | Triggers query execution when Run is clicked |
Usage Examples
In Query Tab
<RunPanel
query={currentQuery}
onQueryChange={(q) => setCurrentQuery(q)}
running={isExecuting}
onRun={(preview) => executeQuery(preview)}
queryEngines={['native', 'sql-native', 'sql-msq-task']}
clusterCapacity={8}
/>
Related Pages
Implements Principle
Requires Environment
Uses Heuristic
Page Connections
Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment