dbt-labs/dbt-core · error

ReplayStatement::bind

Error message

ReplayStatement::bind

What it means

ReplayStatement::bind is unimplemented in the adbc-record-replay crate. The method body is todo!("ReplayStatement::bind"), a deliberate placeholder that panics when reached. The replay driver currently does not support binding Arrow record batches to statements.

Solutions

  1. Avoid bind() in workloads you intend to record and replay; inline parameters into the SQL instead
  2. Implement ReplayStatement::bind to record and replay bind parameters
  3. Capture bound-parameter data in the recording format and apply it during replay
  4. Fall back to a real ADBC driver for statements that require binding

Example fix

// before
fn bind(&mut self, _batch: RecordBatch) -> AdbcResult<()> {
    todo!("ReplayStatement::bind")
}
// after
fn bind(&mut self, _batch: RecordBatch) -> AdbcResult<()> {
    Err(adbc_core::error::Error::with_message(
        Status::NotImplemented,
        "bind is not supported by the replay driver".into(),
    ))
}
Defensive patterns

Strategy: validation

Validate before calling

fn replay_supports_bind(stmt: &ReplayStatement) -> bool {
    false // bind is not implemented in the replay driver
}

Try / catch

// avoid todo! panic by feature-checking before use:
if replay_supports_bind(&stmt) {
    stmt.bind(batch)?;
} else {
    return Err(anyhow!("bind unsupported on replay driver"));
}

Prevention

When it happens

Trigger: Calling Statement::bind with a RecordBatch on a statement obtained from the record-replay ADBC driver.

Common situations: Replaying a recorded session whose original query used bound parameters; porting application code that uses bind() to the replay driver; automated replay of parameterized workloads.

Related errors


AI-assisted analysis of dbt-labs/dbt-core@0267ce9170 (2026-09-07). Data as JSON: /api/errors/984e9526425fb858. Report an issue: GitHub.

Appendix: source

Thrown at crates/adbc-record-replay/src/replay.rs:217

impl ReplayStatement {
    pub(crate) fn new(
        recordings_path: PathBuf,
        config: SharedConfig,
        ctx: RecordingContext,
    ) -> Self {
        Self {
            recordings_path,
            config,
            ctx,
            sql: None,
            recorded_options: BTreeMap::new(),
        }
    }
}

impl Statement for ReplayStatement {
    fn bind(&mut self, _batch: RecordBatch) -> AdbcResult<()> {
        todo!("ReplayStatement::bind")
    }

    fn bind_stream(&mut self, _reader: Box<dyn RecordBatchReader + Send>) -> AdbcResult<()> {
        todo!("ReplayStatement::bind_stream")
    }

    #[allow(deprecated)]
    fn execute<'a>(&'a mut self) -> AdbcResult<Box<dyn RecordBatchReader + Send + 'a>> {
        let replay_sql = match &self.sql {
            Some(sql) => sql,
            None => "none",
        };

        let path = self.recordings_path.clone();
        let unique_id = compute_file_name(
            &path,
            self.ctx.node_id.as_ref(),
            Some(replay_sql),

View on GitHub (pinned to 0267ce9170)