@ -208,7 +208,8 @@ class PartitionIndexReader : public IndexReader, public Cleanable {
// return a two-level iterator: first level is on the partition index
// return a two-level iterator: first level is on the partition index
virtual InternalIterator * NewIterator ( BlockIter * /*iter*/ = nullptr ,
virtual InternalIterator * NewIterator ( BlockIter * /*iter*/ = nullptr ,
bool /*dont_care*/ = true ) override {
bool /*dont_care*/ = true ,
bool fill_cache = true ) override {
// Filters are already checked before seeking the index
// Filters are already checked before seeking the index
if ( ! partition_map_ . empty ( ) ) {
if ( ! partition_map_ . empty ( ) ) {
return NewTwoLevelIterator (
return NewTwoLevelIterator (
@ -216,8 +217,10 @@ class PartitionIndexReader : public IndexReader, public Cleanable {
table_ , partition_map_ . size ( ) ? & partition_map_ : nullptr ) ,
table_ , partition_map_ . size ( ) ? & partition_map_ : nullptr ) ,
index_block_ - > NewIterator ( icomparator_ , nullptr , true ) ) ;
index_block_ - > NewIterator ( icomparator_ , nullptr , true ) ) ;
} else {
} else {
auto ro = ReadOptions ( ) ;
ro . fill_cache = fill_cache ;
return new BlockBasedTableIterator (
return new BlockBasedTableIterator (
table_ , ReadOptions ( ) , * icomparator_ ,
table_ , ro , * icomparator_ ,
index_block_ - > NewIterator ( icomparator_ , nullptr , true ) , false ) ;
index_block_ - > NewIterator ( icomparator_ , nullptr , true ) , false ) ;
}
}
// TODO(myabandeh): Update TwoLevelIterator to be able to make use of
// TODO(myabandeh): Update TwoLevelIterator to be able to make use of
@ -364,6 +367,7 @@ class BinarySearchIndexReader : public IndexReader {
}
}
virtual InternalIterator * NewIterator ( BlockIter * iter = nullptr ,
virtual InternalIterator * NewIterator ( BlockIter * iter = nullptr ,
bool /*dont_care*/ = true ,
bool /*dont_care*/ = true ) override {
bool /*dont_care*/ = true ) override {
return index_block_ - > NewIterator ( icomparator_ , iter , true ) ;
return index_block_ - > NewIterator ( icomparator_ , iter , true ) ;
}
}
@ -474,7 +478,8 @@ class HashIndexReader : public IndexReader {
}
}
virtual InternalIterator * NewIterator ( BlockIter * iter = nullptr ,
virtual InternalIterator * NewIterator ( BlockIter * iter = nullptr ,
bool total_order_seek = true ) override {
bool total_order_seek = true ,
bool /*dont_care*/ = true ) override {
return index_block_ - > NewIterator ( icomparator_ , iter , total_order_seek ) ;
return index_block_ - > NewIterator ( icomparator_ , iter , total_order_seek ) ;
}
}
@ -1364,12 +1369,12 @@ InternalIterator* BlockBasedTable::NewIndexIterator(
// index reader has already been pre-populated.
// index reader has already been pre-populated.
if ( rep_ - > index_reader ) {
if ( rep_ - > index_reader ) {
return rep_ - > index_reader - > NewIterator (
return rep_ - > index_reader - > NewIterator (
input_iter , read_options . total_order_seek ) ;
input_iter , read_options . total_order_seek , read_options . fill_cache ) ;
}
}
// we have a pinned index block
// we have a pinned index block
if ( rep_ - > index_entry . IsSet ( ) ) {
if ( rep_ - > index_entry . IsSet ( ) ) {
return rep_ - > index_entry . value - > NewIterator ( input_iter ,
return rep_ - > index_entry . value - > NewIterator (
read_options . total_order_seek ) ;
input_iter , read_options . total_order_seek , read_options . fill_cache ) ;
}
}
PERF_TIMER_GUARD ( read_index_block_nanos ) ;
PERF_TIMER_GUARD ( read_index_block_nanos ) ;