summaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorHåvard Pettersen <havardpe@yahooinc.com>2022-06-23 14:27:08 +0000
committerHåvard Pettersen <havardpe@yahooinc.com>2022-06-23 14:27:08 +0000
commitdd917824d42c454f97c8499ef9fb0b1a4dd5adc8 (patch)
tree978e2d851899dfe4f28d4a32e84a1cb1130caab4 /searchlib
parent550e4802c3376a5cf339027a22d05c32cb3a38db (diff)
well defined overflow
The grouping test seems to indicate that failed map lookups should result in adding the undefined value. undefined + undefined => 0. Previously with undefined overflow, now with well defined overflow.
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/vespa/searchlib/expression/integerresultnode.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/searchlib/src/vespa/searchlib/expression/integerresultnode.h b/searchlib/src/vespa/searchlib/expression/integerresultnode.h
index a7fe86acd97..e63ac783bc8 100644
--- a/searchlib/src/vespa/searchlib/expression/integerresultnode.h
+++ b/searchlib/src/vespa/searchlib/expression/integerresultnode.h
@@ -28,7 +28,7 @@ public:
T bv(static_cast<const IntegerResultNodeT &>(b)._value);
return (_value < bv) ? -1 : (_value > bv) ? 1 : 0;
}
- void add(const ResultNode & b) override { _value += b.getInteger(); }
+ void add(const ResultNode & b) override { _value = uint64_t(_value) + uint64_t(b.getInteger()); }
void negate() override { _value = - _value; }
void multiply(const ResultNode & b) override {
if constexpr (std::is_same_v<T, bool>) {