dbt-labs/dbt-core · error
index_of_row
Error message
index_of_row
What it means
This method is an unimplemented stub: it panics with todo!() whenever called. It corresponds to AgateTable's Python index_of_row, which should return the zero-based position of the first row equal to the needle value (or None if absent), but the Rust port has not implemented the row-equality search yet. It fires only when dbt-core code calls index_of_row on a table before the stub is filled in.
Solutions
- Scan rows for the first element-wise equal match and return its index
- Return None if no row matches
- Return an unsupported error instead of todo!() until implemented
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at crates/dbt-agate/src/table.rs:309 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of dbt-labs/dbt-core@0267ce9170 (2026-09-07).
Data as JSON: /api/errors/e9ae862fb2c2fc6d.
Report an issue: GitHub.
Appendix: source
Thrown at crates/dbt-agate/src/table.rs:309
pub fn rows(self: &Arc<Self>) -> Rows {
Rows::new(Arc::clone(self))
}
pub fn row_names(&self) -> Option<Tuple> {
self.row_names.as_ref().map(|names| {
let repr = RowNamesAsTuple::new(Arc::clone(names));
let tuple = Tuple(Box::new(repr));
tuple
})
}
pub fn count_occurrences_of_row(&self, _needle: &Value) -> usize {
todo!("count_occurrences_of_row")
}
pub fn index_of_row(&self, _needle: &Value) -> Option<usize> {
todo!("index_of_row")
}
pub fn count_occurrences_of_value_in_row(
self: &Arc<Self>,
_needle: &Value,
row_idx: isize,
) -> usize {
let _row = self.row_by_index(row_idx).unwrap();
todo!("count_occurrences_of_value_in_row")
}
pub fn index_of_value_in_row(
self: &Arc<Self>,
_needle: &Value,
row_idx: isize,
) -> Option<usize> {
let _row = self.row_by_index(row_idx).unwrap();
todo!("index_of_value_in_row")View on GitHub (pinned to 0267ce9170)