Add a comment about potentiall returning reference to id hash-set in fetch_ids_from_index.
This commit is contained in:
parent
b04f3d167b
commit
ba2c1bae6d
1 changed files with 3 additions and 0 deletions
|
|
@ -218,6 +218,9 @@ impl Table {
|
||||||
} else {
|
} else {
|
||||||
match self.indexes.get(&column_position) {
|
match self.indexes.get(&column_position) {
|
||||||
Some(index) => {
|
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();
|
let ids = index.get(value).cloned();
|
||||||
Ok(ids)
|
Ok(ids)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue