diff --git a/minisql/src/internals/table.rs b/minisql/src/internals/table.rs index d4210b8..e5506e0 100644 --- a/minisql/src/internals/table.rs +++ b/minisql/src/internals/table.rs @@ -218,6 +218,9 @@ impl Table { } else { match self.indexes.get(&column_position) { Some(index) => { + // Note that we are cloning the ids here! This can be very wasteful in some cases. + // It would be possible to just return a reference, + // but this seems fairly non-trivial. let ids = index.get(value).cloned(); Ok(ids) }