{"record":{"id":"e1d107cc3de22824","repo":"dbt-labs/dbt-core","slug":"replaystatement-prepare","errorCode":null,"errorMessage":"ReplayStatement::prepare","messagePattern":"ReplayStatement::prepare","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adbc-record-replay/src/replay.rs","lineNumber":344,"sourceCode":"            }\n            StorageType::FileArrowIpc | StorageType::FileParquet => Ok(None),\n        }\n    }\n\n    fn execute_schema(&mut self) -> AdbcResult<Schema> {\n        todo!(\"ReplayStatement::execute_schema\")\n    }\n\n    fn execute_partitions(&mut self) -> AdbcResult<adbc_core::PartitionedResult> {\n        todo!(\"ReplayStatement::execute_partitions\")\n    }\n\n    fn get_parameter_schema(&self) -> AdbcResult<Schema> {\n        todo!(\"ReplayStatement::get_parameter_schema\")\n    }\n\n    fn prepare(&mut self) -> AdbcResult<()> {\n        todo!(\"ReplayStatement::prepare\")\n    }\n\n    fn set_sql_query(&mut self, sql: &str) -> AdbcResult<()> {\n        self.sql = Some(sql.to_string());\n        Ok(())\n    }\n\n    fn set_substrait_plan(&mut self, _plan: &[u8]) -> AdbcResult<()> {\n        unimplemented!(\"ReplayStatement::set_substrait_plan\")\n    }\n\n    fn cancel(&mut self) -> AdbcResult<()> {\n        todo!(\"ReplayStatement::cancel\")\n    }\n\n    fn set_option(&mut self, key: OptionStatement, value: OptionValue) -> AdbcResult<()> {\n        if let OptionStatement::Other(ref name) = key {\n            self.ctx.absorb_option(name, &value);","sourceCodeStart":326,"sourceCodeEnd":362,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/adbc-record-replay/src/replay.rs#L326-L362","documentation":"ReplayStatement::prepare is unimplemented in the adbc-record-replay crate. The todo!() placeholder panics when a caller prepares a SQL query on a replay statement. Note set_sql_query does work (it stores the SQL), so the panic only occurs at the prepare step of the prepared-statement lifecycle.","triggerScenarios":"Calling Statement::prepare on a record-replay driver statement after setting a SQL query.","commonSituations":"Prepared-statement based clients replaying recorded sessions; ORMs or query builders that always call prepare before execute; replaying parameterized workloads.","solutions":["Use the unprepared path (set_sql_query + execute) during replay instead of prepare","Implement prepare to replay the recorded prepared-statement state","Return a proper Status::NotImplemented error instead of panicking","Record and replay only workloads that avoid prepared statements"],"exampleFix":"// before\nfn prepare(&mut self) -> AdbcResult<()> {\n    todo!(\"ReplayStatement::prepare\")\n}\n// after\nfn prepare(&mut self) -> AdbcResult<()> {\n    Err(adbc_core::error::Error::with_message(\n        Status::NotImplemented,\n        \"prepare is not supported by the replay driver\".into(),\n    ))\n}","handlingStrategy":"fallback","validationCode":"fn replay_supports_prepare(stmt: &ReplayStatement) -> bool {\n    false // prepare is not implemented in the replay driver\n}","typeGuard":null,"tryCatchPattern":"if replay_supports_prepare(&stmt) {\n    stmt.prepare()?;\n    stmt.execute()?;\n} else {\n    stmt.set_sql_query(&sql)?;\n    stmt.execute()?; // fallback: unprepared execution\n}","preventionTips":["Use set_sql_query + execute instead of prepare during replay","Record only unprepared workloads for replay","Contribute prepare support to the replay driver before replaying prepared flows"],"tags":["adbc","unimplemented","replay","placeholder"],"backgroundTag":"method-not-implemented","analyzedSha":"0267ce9170576975b76b64ce856b2e5848e96617","analyzedAt":"2026-09-07T21:53:39.732Z","contentChangedAt":"2026-09-07T21:53:39.732Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}