{"record":{"id":"6422602b1450cf87","repo":"cube-js/cube","slug":"analyze-is-not-supported","errorCode":null,"errorMessage":"Analyze is not supported","messagePattern":"Analyze is not supported","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"rust/cubesql/cubesql/src/compile/rewrite/converter.rs","lineNumber":817,"sourceCode":"                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),\n        })\n    }\n    fn find_source_table_name(&self, plan: &LogicalPlan) -> Result<Option<String>, CubeError> {","sourceCodeStart":799,"sourceCodeEnd":835,"githubUrl":"https://github.com/cube-js/cube/blob/7d981676b36392fec34088b9afab6bdcad40207c/rust/cubesql/cubesql/src/compile/rewrite/converter.rs#L799-L835","documentation":"CubeSQL's legacy SQL planner converts a DataFusion LogicalPlan into Cube's internal logical plan. LogicalPlan::Analyze nodes (produced by EXPLAIN ANALYZE execution plans) have no conversion, so add_logical_plan_replace_params panics deliberately rather than produce an incorrect plan.","triggerScenarios":"A DataFusion LogicalPlan containing an Analyze node is passed to add_logical_plan / plan — typically when EXPLAIN ANALYZE is executed against a query that reaches the rewrite converter.","commonSituations":"Running EXPLAIN ANALYZE through the CubeSQL Postgres wire protocol; internal tooling that instruments query plans; client drivers that prepend EXPLAIN ANALYZE for profiling.","solutions":["Remove EXPLAIN ANALYZE and run the query normally, or use plain EXPLAIN if supported upstream","Check CubeSQL version for support of explain analyze; upgrade Cube/CubeSQL","If you control the caller, strip Analyze nodes before handing the plan to the converter"],"exampleFix":"// before\nEXPLAIN ANALYZE SELECT count(*) FROM orders;\n// after\nSELECT count(*) FROM orders;","handlingStrategy":"validation","validationCode":"// Caller-side (SQL): detect unsupported EXPLAIN ANALYZE before sending\nfn assert_no_explain_analyze(sql: &str) -> Result<(), String> {\n    let lower = sql.to_lowercase();\n    if lower.contains(\"explain analyze\") {\n        Err(\"EXPLAIN ANALYZE is not supported by CubeSQL planner\".into())\n    } else { Ok(()) }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Don't run EXPLAIN ANALYZE through the CubeSQL Postgres protocol","Profile queries with external observability instead of EXPLAIN ANALYZE","Pin and track CubeSQL release notes for explain support"],"tags":["rust","panic","unsupported-plan-node","explain-analyze"],"backgroundTag":"unsupported-plan-node","analyzedSha":"7d981676b36392fec34088b9afab6bdcad40207c","analyzedAt":"2026-09-02T03:45:10.400Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}