Closed dieu closed 5 years ago
this is certainly scary.... can you also add one using mapGroup which should also show the bug, since fold is just calling mapGroup...
so, the problem with fold
, we doing fold on empty-iterator
(when no data on left), but it's legit that fold on empty produce init
as result.
last comment, does only fold trigger it? We don't often use fold, but we do very often use .sum
before a join.
I can't believe we don't have test coverage for this case. That's really unfortunate.
last comment, does only fold trigger it? We don't often use fold, but we do very often use
.sum
before a join.
writing tests for others...
Hey,
We found the problem with
Join
and if something before can producenon-empty
iterator forempty-iterator
, likefold
,foldLeft
, crazySemigroup
insumLeft
.While we are joining, we get an iterator from cascading and try to apply everything that's not yet applied to this value, some of the function can produce
non-empty
iterator even if don't have anything (aka cascading give usempty
iterator).