@ -74,7 +74,7 @@ class IndexBuilder {
Slice index_block_contents ;
std : : unordered_map < std : : string , Slice > meta_blocks ;
} ;
explicit IndexBuilder ( const Comparator * comparator )
explicit IndexBuilder ( const InternalKey Comparator* comparator )
: comparator_ ( comparator ) { }
virtual ~ IndexBuilder ( ) { }
@ -107,7 +107,7 @@ class IndexBuilder {
virtual size_t EstimatedSize ( ) const = 0 ;
protected :
const Comparator * comparator_ ;
const InternalKey Comparator* comparator_ ;
} ;
// This index builder builds space-efficient index block.
@ -121,7 +121,7 @@ class IndexBuilder {
// substitute key that serves the same function.
class ShortenedIndexBuilder : public IndexBuilder {
public :
explicit ShortenedIndexBuilder ( const Comparator * comparator ,
explicit ShortenedIndexBuilder ( const InternalKey Comparator* comparator ,
int index_block_restart_interval )
: IndexBuilder ( comparator ) ,
index_block_builder_ ( index_block_restart_interval ) { }
@ -180,7 +180,7 @@ class ShortenedIndexBuilder : public IndexBuilder {
// data copy or small heap allocations for prefixes.
class HashIndexBuilder : public IndexBuilder {
public :
explicit HashIndexBuilder ( const Comparator * comparator ,
explicit HashIndexBuilder ( const InternalKey Comparator* comparator ,
const SliceTransform * hash_key_extractor ,
int index_block_restart_interval )
: IndexBuilder ( comparator ) ,
@ -269,7 +269,8 @@ class HashIndexBuilder : public IndexBuilder {
namespace {
// Create a index builder based on its type.
IndexBuilder * CreateIndexBuilder ( IndexType type , const Comparator * comparator ,
IndexBuilder * CreateIndexBuilder ( IndexType type ,
const InternalKeyComparator * comparator ,
const SliceTransform * prefix_extractor ,
int index_block_restart_interval ) {
switch ( type ) {
@ -893,8 +894,8 @@ Status BlockBasedTableBuilder::Finish() {
r - > table_options . filter_policy - > Name ( ) : " " ;
r - > props . index_size =
r - > index_builder - > EstimatedSize ( ) + kBlockTrailerSize ;
r - > props . comparator_name = r - > ioptions . comparator ! = nullptr
? r - > ioptions . comparator - > Name ( )
r - > props . comparator_name = r - > ioptions . user_ comparator ! = nullptr
? r - > ioptions . user_ comparator- > Name ( )
: " nullptr " ;
r - > props . merge_operator_name = r - > ioptions . merge_operator ! = nullptr
? r - > ioptions . merge_operator - > Name ( )