-
Bug
-
Resolution: Done
-
Major
-
7.45.0.Final
-
None
-
2020 Week 43-45 (from Okt 19)
-
2
-
- Unit test AccumulateTest.testDoubleAccumulateNPE() is updated in the PR
-
Undefined
-
NEW
-
NEW
-
---
-
---
DROOLS-5786 solved the NPE but the second accumulate (in AccumulateTest.testDoubleAccumulateNPE()) produces a wrong result (= 0 instead of 2). 2 points to be fixed:
1. RuleNetworkEvaluator.doUpdatesReorderLeftMemory() causes wrong LeftTupleMemory size when calling TupleList.remove() for a tuple which doesn't exist in the list. (When removed, size becomes -1. Then added, size becomes 0. so the leftTuple is not evaluated in doRightInserts() : https://github.com/kiegroup/drools/blob/master/drools-core/src/main/java/org/drools/core/phreak/PhreakAccumulateNode.java#L215 )
2. Creating AccumulateContext right before evaluateResultConstraints() is too late. It is used by addMatch() so it needs to be created earlier (e.g. in doLeftUpdates())
- relates to
-
DROOLS-5786 NPE with a double groupBy
-
- Closed
-