{"record":{"id":"00fb4f553ccd1ce5","repo":"cube-js/cube","slug":"createexternaltable-is-not-supported","errorCode":null,"errorMessage":"CreateExternalTable is not supported","messagePattern":"CreateExternalTable is not supported","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"rust/cubesql/cubesql/src/compile/rewrite/converter.rs","lineNumber":811,"sourceCode":"                    produce_one_row,\n                    derived_source_table_name,\n                    is_wrappable,\n                ]))\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]))","sourceCodeStart":793,"sourceCodeEnd":829,"githubUrl":"https://github.com/cube-js/cube/blob/7d981676b36392fec34088b9afab6bdcad40207c/rust/cubesql/cubesql/src/compile/rewrite/converter.rs#L793-L829","documentation":"CubeSQL's converter that turns DataFusion LogicalPlans into the EQ graph language explicitly does not support CreateExternalTable and panics when it encounters one. The logical-plan-to-graph translation only covers query plans CubeSQL actually executes.","triggerScenarios":"Parsing/planning a SQL statement like CREATE EXTERNAL TABLE ... and converting the resulting LogicalPlan::CreateExternalTable via add_logical_plan_replace_params / plan().","commonSituations":"Users sending DDL for external tables through the CubeSQL interface (e.g. via the Postgres protocol), scripts migrated from raw DataFusion usage, tooling that generates external-table DDL.","solutions":["Do not issue CREATE EXTERNAL TABLE through CubeSQL; create external tables via Cube Store tooling or the appropriate native path instead.","Guard the SQL layer to intercept and reject/handle external-table DDL before conversion.","If support is needed, implement the CreateExternalTable arm in the converter upstream."],"exampleFix":"// before\nawait sqlApi.query('CREATE EXTERNAL TABLE t STORED AS PARQUET LOCATION ...');\n// after\n// create the external table via Cube Store CLI/API, then query it through CubeSQL","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never send CREATE EXTERNAL TABLE through the CubeSQL interface","Pre-validate or intercept DDL at the gateway","Use Cube Store tooling for external table management"],"tags":["rust","cubesql","panic","unsupported-sql","ddl"],"backgroundTag":"unsupported-statement","analyzedSha":"7d981676b36392fec34088b9afab6bdcad40207c","analyzedAt":"2026-09-02T03:45:10.400Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}