dbt-labs/dbt-core · error

ReplayStatement::execute_partitions

Error message

ReplayStatement::execute_partitions

What it means

ReplayStatement::execute_partitions is unimplemented in the adbc-record-replay crate. The todo!() placeholder panics when a caller requests partitioned result execution. Partitioned results (multi-partition distributed result sets) are not modeled by the replay format yet.

Source

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

                        msg,
                        AdbcStatus::Internal,
                    ));
                }

                self.recorded_options = entry.options;

                Ok(None)
            }
            StorageType::FileArrowIpc | StorageType::FileParquet => Ok(None),
        }
    }

    fn execute_schema(&mut self) -> AdbcResult<Schema> {
        todo!("ReplayStatement::execute_schema")
    }

    fn execute_partitions(&mut self) -> AdbcResult<adbc_core::PartitionedResult> {
        todo!("ReplayStatement::execute_partitions")
    }

    fn get_parameter_schema(&self) -> AdbcResult<Schema> {
        todo!("ReplayStatement::get_parameter_schema")
    }

    fn prepare(&mut self) -> AdbcResult<()> {
        todo!("ReplayStatement::prepare")
    }

    fn set_sql_query(&mut self, sql: &str) -> AdbcResult<()> {
        self.sql = Some(sql.to_string());
        Ok(())
    }

    fn set_substrait_plan(&mut self, _plan: &[u8]) -> AdbcResult<()> {
        unimplemented!("ReplayStatement::set_substrait_plan")
    }

View on GitHub (pinned to 0267ce9170)

Solutions

  1. Use execute() (single RecordBatchReader) instead of execute_partitions during replay
  2. Implement execute_partitions by replaying the recorded partition descriptors
  3. Return a proper Status::NotImplemented error instead of panicking
  4. Record with a driver/configuration that does not produce partitioned results

Example fix

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

Strategy: fallback

Validate before calling

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

Try / catch

let reader = if replay_supports_partitions(&stmt) {
    // combine partitions
    unreachable-checked path
} else {
    stmt.execute()? // fallback to unpartitioned execute
};

Prevention

When it happens

Trigger: Calling Statement::execute_partitions on a record-replay driver statement.

Common situations: ADBC clients that use the partitioned-result API for distributed engines; generic code paths that try execute_partitions before falling back to execute; replaying workloads originally run against partitioned backends.

Related errors


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