cube-js/cube · error
Explain is not supported
Error message
Explain is not supported
What it means
The same EQ-graph converter panics on LogicalPlan::Explain: EXPLAIN statements are not supported in the logical-plan-to-graph translation, so an Explain plan reaching the converter aborts instead of producing a graph.
Source
Thrown at rust/cubesql/cubesql/src/compile/rewrite/converter.rs:814
]))
}
LogicalPlan::Limit(limit) => {
let skip = add_data_node!(self, limit.skip, LimitSkip);
let fetch = add_data_node!(self, limit.fetch, LimitFetch);
let input =
self.add_logical_plan_replace_params(limit.input.as_ref(), query_params, ctx)?;
self.graph
.add(LogicalPlanLanguage::Limit([skip, fetch, input]))
}
LogicalPlan::Values(values) => {
let values = add_data_node!(self, values.values, ValuesValues);
self.graph.add(LogicalPlanLanguage::Values([values]))
}
LogicalPlan::CreateExternalTable { .. } => {
panic!("CreateExternalTable is not supported");
}
LogicalPlan::Explain { .. } => {
panic!("Explain is not supported");
}
LogicalPlan::Analyze { .. } => {
panic!("Analyze is not supported");
}
// TODO
LogicalPlan::Extension(ext) => {
panic!("Unsupported extension node: {}", ext.node.schema());
}
LogicalPlan::Distinct(distinct) => {
let input = self.add_logical_plan_replace_params(
distinct.input.as_ref(),
query_params,
ctx,
)?;
self.graph.add(LogicalPlanLanguage::Distinct([input]))
}
// TODO: Support all
_ => unimplemented!("Unsupported node type: {:?}", plan),View on GitHub (pinned to 7d981676b3)
Solutions
- Remove the EXPLAIN prefix and run the underlying query; use Cube's own query-inspection/logging for plan details.
- Intercept EXPLAIN statements at the SQL gateway before they reach the converter.
- Guard code that converts plans with a variant check for Explain/Analyze.
Example fix
// before EXPLAIN SELECT count(*) FROM orders; // after SELECT count(*) FROM orders;
Defensive patterns
Strategy: validation
Prevention
- Strip or reject EXPLAIN/EXPLAIN ANALYZE before they reach CubeSQL
- Use Cube's logging/inspection features instead of SQL EXPLAIN
- Add plan-variant guards in any code that converts LogicalPlans
When it happens
Trigger: Sending EXPLAIN <query> (or EXPLAIN ANALYZE, which similarly panics) through CubeSQL so its plan converts via add_logical_plan_replace_params.
Common situations: Debugging queries by prefixing EXPLAIN out of habit from Postgres workflows, ORM/BI tools that auto-generate EXPLAIN for query analysis.
Related errors
- CreateExternalTable is not supported
- This query doesnt have a plan, because it already has values
- Should be rewritten with UtcTimestamp function
- Analyze is not supported
- Unsupported extension node: {}
AI-assisted analysis of cube-js/cube@7d981676b3 (2026-09-02).
Data as JSON: /api/errors/36aace92b9848594.
Report an issue: GitHub.