| 355 | } |
| 356 | |
| 357 | func (opt *IteratorOptions) pickTable(t table.TableInterface) bool { |
| 358 | if len(opt.Prefix) == 0 { |
| 359 | return true |
| 360 | } |
| 361 | if opt.compareToPrefix(t.Smallest()) > 0 { |
| 362 | return false |
| 363 | } |
| 364 | if opt.compareToPrefix(t.Biggest()) < 0 { |
| 365 | return false |
| 366 | } |
| 367 | // Bloom filter lookup would only work if opt.Prefix does NOT have the read |
| 368 | // timestamp as part of the key. |
| 369 | if opt.prefixIsKey && t.DoesNotHave(farm.Fingerprint64(opt.Prefix)) { |
| 370 | return false |
| 371 | } |
| 372 | return true |
| 373 | } |
| 374 | |
| 375 | // pickTables picks the necessary table for the iterator. This function also assumes |
| 376 | // that the tables are sorted in the right order. |