Replaced obsolete comparator with builtin variant.
This commit is contained in:
parent
81828592b8
commit
1c7c764761
@ -235,27 +235,9 @@ TEST(WriteBatchWithIndexTest, TestValueAsSecondaryIndex) {
|
||||
}
|
||||
}
|
||||
|
||||
class ReverseComparator : public Comparator {
|
||||
public:
|
||||
ReverseComparator() {}
|
||||
|
||||
virtual const char* Name() const override {
|
||||
return "rocksdb.ReverseComparator";
|
||||
}
|
||||
|
||||
virtual int Compare(const Slice& a, const Slice& b) const override {
|
||||
return 0 - BytewiseComparator()->Compare(a, b);
|
||||
}
|
||||
|
||||
virtual void FindShortestSeparator(std::string* start,
|
||||
const Slice& limit) const {}
|
||||
virtual void FindShortSuccessor(std::string* key) const {}
|
||||
};
|
||||
|
||||
TEST(WriteBatchWithIndexTest, TestComparatorForCF) {
|
||||
ReverseComparator reverse_cmp;
|
||||
ColumnFamilyHandleImplDummy cf1(6, nullptr);
|
||||
ColumnFamilyHandleImplDummy reverse_cf(66, &reverse_cmp);
|
||||
ColumnFamilyHandleImplDummy reverse_cf(66, ReverseBytewiseComparator());
|
||||
ColumnFamilyHandleImplDummy cf2(88, BytewiseComparator());
|
||||
WriteBatchWithIndex batch(BytewiseComparator(), 20);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user