diff options
author | Santiago Alessandri <san.lt.ss@gmail.com> | 2015-10-20 01:12:03 -0700 |
---|---|---|
committer | Charlie Swanson <charlie.swanson@mongodb.com> | 2016-02-02 10:07:36 -0500 |
commit | 83afa046ee7470664f877b7d741d0a0e33780f16 (patch) | |
tree | 2ad2c774233dbecb8542c4fc9d6d3c8b1f5c573e /src/mongo/db/pipeline/accumulator.h | |
parent | 4c6781e2f5e273ad243a459c29917115d157ece1 (diff) | |
download | mongo-83afa046ee7470664f877b7d741d0a0e33780f16.tar.gz |
SERVER-18957 Separate isAssociativeAndCommutative into two functions.
Closes #1024
Signed-off-by: Charlie Swanson <charlie.swanson@mongodb.com>
Diffstat (limited to 'src/mongo/db/pipeline/accumulator.h')
-rw-r--r-- | src/mongo/db/pipeline/accumulator.h | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/src/mongo/db/pipeline/accumulator.h b/src/mongo/db/pipeline/accumulator.h index 77c3ecf63fc..afcce43669e 100644 --- a/src/mongo/db/pipeline/accumulator.h +++ b/src/mongo/db/pipeline/accumulator.h @@ -99,7 +99,11 @@ public: */ static Factory getFactory(StringData name); - virtual bool isAssociativeAndCommutative() const { + virtual bool isAssociative() const { + return false; + } + + virtual bool isCommutative() const { return false; } @@ -123,7 +127,11 @@ public: static boost::intrusive_ptr<Accumulator> create(); - bool isAssociativeAndCommutative() const final { + bool isAssociative() const final { + return true; + } + + bool isCommutative() const final { return true; } @@ -177,7 +185,11 @@ public: static boost::intrusive_ptr<Accumulator> create(); - bool isAssociativeAndCommutative() const final { + bool isAssociative() const final { + return true; + } + + bool isCommutative() const final { return true; } @@ -202,7 +214,11 @@ public: const char* getOpName() const final; void reset() final; - bool isAssociativeAndCommutative() const final { + bool isAssociative() const final { + return true; + } + + bool isCommutative() const final { return true; } |