{"record":{"id":"36aace92b9848594","repo":"cube-js/cube","slug":"explain-is-not-supported","errorCode":null,"errorMessage":"Explain is not supported","messagePattern":"Explain is not supported","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"rust/cubesql/cubesql/src/compile/rewrite/converter.rs","lineNumber":814,"sourceCode":"                ]))\n            }\n            LogicalPlan::Limit(limit) => {\n                let skip = add_data_node!(self, limit.skip, LimitSkip);\n                let fetch = add_data_node!(self, limit.fetch, LimitFetch);\n                let input =\n                    self.add_logical_plan_replace_params(limit.input.as_ref(), query_params, ctx)?;\n                self.graph\n                    .add(LogicalPlanLanguage::Limit([skip, fetch, input]))\n            }\n            LogicalPlan::Values(values) => {\n                let values = add_data_node!(self, values.values, ValuesValues);\n                self.graph.add(LogicalPlanLanguage::Values([values]))\n            }\n            LogicalPlan::CreateExternalTable { .. } => {\n                panic!(\"CreateExternalTable is not supported\");\n            }\n            LogicalPlan::Explain { .. } => {\n                panic!(\"Explain is not supported\");\n            }\n            LogicalPlan::Analyze { .. } => {\n                panic!(\"Analyze is not supported\");\n            }\n            // TODO\n            LogicalPlan::Extension(ext) => {\n                panic!(\"Unsupported extension node: {}\", ext.node.schema());\n            }\n            LogicalPlan::Distinct(distinct) => {\n                let input = self.add_logical_plan_replace_params(\n                    distinct.input.as_ref(),\n                    query_params,\n                    ctx,\n                )?;\n                self.graph.add(LogicalPlanLanguage::Distinct([input]))\n            }\n            // TODO: Support all\n            _ => unimplemented!(\"Unsupported node type: {:?}\", plan),","sourceCodeStart":796,"sourceCodeEnd":832,"githubUrl":"https://github.com/cube-js/cube/blob/7d981676b36392fec34088b9afab6bdcad40207c/rust/cubesql/cubesql/src/compile/rewrite/converter.rs#L796-L832","documentation":"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.","triggerScenarios":"Sending EXPLAIN <query> (or EXPLAIN ANALYZE, which similarly panics) through CubeSQL so its plan converts via add_logical_plan_replace_params.","commonSituations":"Debugging queries by prefixing EXPLAIN out of habit from Postgres workflows, ORM/BI tools that auto-generate EXPLAIN for query analysis.","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."],"exampleFix":"// before\nEXPLAIN SELECT count(*) FROM orders;\n// after\nSELECT count(*) FROM orders;","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["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"],"tags":["rust","cubesql","panic","unsupported-sql","explain"],"backgroundTag":"unsupported-statement","analyzedSha":"7d981676b36392fec34088b9afab6bdcad40207c","analyzedAt":"2026-09-02T03:45:10.400Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}