scala-rrb-vector icon indicating copy to clipboard operation
scala-rrb-vector copied to clipboard

cleanTopDrop can create trees with incorrect depth

Open cbfiddle opened this issue 3 years ago • 0 comments

cleanTopDrop compares sections of the cutIndex with the length of display nodes, for example: if ((cutIndex >> 5) == display1.length - 2) { The problem is that the cutIndex is not masked after shifting, which means that the comparison can fail when it should succeed, causing the newDepth to be too high.

cbfiddle avatar Jul 28 '21 02:07 cbfiddle