Hi.
In function *CheckNNConstraintFetch* the array index is
incremented only when "null combin" is not found.
IMO the last cache entry can be overwriting if the next tuple is null,
because, the fill array fields is not syncronized with array index increment.
Fix by moving the array fill.
patch attached.
best regards,
Ranier Vilela