mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-30 00:56:44 +01:00
compile all
This commit is contained in:
parent
bc1b26d0a9
commit
190c9fb917
@ -139,6 +139,9 @@ namespace mongo {
|
||||
BSONObj explain() const;
|
||||
bool usingPrerecordedPlan() const { return usingPrerecordedPlan_; }
|
||||
PlanPtr getBestGuess() const;
|
||||
|
||||
//for testing
|
||||
const FieldRangeSet &fbs() const { return fbs_; }
|
||||
private:
|
||||
void addOtherPlans( bool checkFirst );
|
||||
void addPlan( PlanPtr plan, bool checkFirst ) {
|
||||
|
@ -130,7 +130,7 @@ namespace QueryOptimizerTests {
|
||||
class TwoGt : public Gt {
|
||||
virtual BSONObj query() { return BSON( "a" << GT << 0 << GT << 1 ); }
|
||||
};
|
||||
|
||||
|
||||
class EqGte : public Eq {
|
||||
virtual BSONObj query() { return BSON( "a" << 1 << "a" << GTE << 1 ); }
|
||||
};
|
||||
@ -146,10 +146,10 @@ namespace QueryOptimizerTests {
|
||||
struct RegexBase : Base {
|
||||
void run() { //need to only look at first interval
|
||||
FieldRangeSet s( "ns", query() );
|
||||
checkElt( lower(), s.range( "a" ).intervals()[0].lower_.bound_ );
|
||||
checkElt( upper(), s.range( "a" ).intervals()[0].upper_.bound_ );
|
||||
ASSERT_EQUALS( lowerInclusive(), s.range( "a" ).intervals()[0].lower_.inclusive_ );
|
||||
ASSERT_EQUALS( upperInclusive(), s.range( "a" ).intervals()[0].upper_.inclusive_ );
|
||||
checkElt( lower(), s.range( "a" ).intervals()[0]._lower._bound );
|
||||
checkElt( upper(), s.range( "a" ).intervals()[0]._upper._bound );
|
||||
ASSERT_EQUALS( lowerInclusive(), s.range( "a" ).intervals()[0]._lower._inclusive );
|
||||
ASSERT_EQUALS( upperInclusive(), s.range( "a" ).intervals()[0]._upper._inclusive );
|
||||
}
|
||||
};
|
||||
|
||||
@ -325,9 +325,9 @@ namespace QueryOptimizerTests {
|
||||
vector< FieldInterval >::const_iterator j = intervals.begin();
|
||||
double expected[] = { 3, 5, 9 };
|
||||
for( int i = 0; i < 3; ++i, ++j ) {
|
||||
ASSERT_EQUALS( expected[ i ], j->lower_.bound_.number() );
|
||||
ASSERT( j->lower_.inclusive_ );
|
||||
ASSERT( j->lower_ == j->upper_ );
|
||||
ASSERT_EQUALS( expected[ i ], j->_lower._bound.number() );
|
||||
ASSERT( j->_lower._inclusive );
|
||||
ASSERT( j->_lower == j->_upper );
|
||||
}
|
||||
ASSERT( j == intervals.end() );
|
||||
}
|
||||
|
@ -640,11 +640,11 @@ namespace mongo {
|
||||
{
|
||||
const FieldInterval& fi = *it;
|
||||
assert(fi.valid());
|
||||
BSONObj minObj = BSON(field.fieldName() << fi.lower_.bound_);
|
||||
BSONObj maxObj = BSON(field.fieldName() << fi.upper_.bound_);
|
||||
BSONObj minObj = BSON(field.fieldName() << fi._lower._bound);
|
||||
BSONObj maxObj = BSON(field.fieldName() << fi._upper._bound);
|
||||
ChunkRangeMap::const_iterator min, max;
|
||||
min = (fi.lower_.inclusive_ ? _chunkRanges.upper_bound(minObj) : _chunkRanges.lower_bound(minObj));
|
||||
max = (fi.upper_.inclusive_ ? _chunkRanges.upper_bound(maxObj) : _chunkRanges.lower_bound(maxObj));
|
||||
min = (fi._lower._inclusive ? _chunkRanges.upper_bound(minObj) : _chunkRanges.lower_bound(minObj));
|
||||
max = (fi._upper._inclusive ? _chunkRanges.upper_bound(maxObj) : _chunkRanges.lower_bound(maxObj));
|
||||
|
||||
assert(min != _chunkRanges.ranges().end());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user