8 Apr
2019
8 Apr
'19
1:27 p.m.
Hi, I was looking at this piece of code (end of pcrejoin loop), and I have the feeling something isn't right. Inside the body of if (nl == 0) a condition over lastl is checked. However, it seems to me that lastl gets a useful value only when nl > 0. If (nl == 0) then lastl must be 0. <loop> { /* actual body */ .... /* track result properties */ if (BATcount(r1) > 0) { if (lastl + 1 != lo) r1->tseqbase = oid_nil; if (nl == 0) { r2->trevsorted = 0; if (lastl > lo) { r1->tsorted = 0; r1->tkey = 0; } else if (lastl < lo) { r1->trevsorted = 0; } else { r1->tkey = 0; } } } APPEND(r1, lo); APPEND(r2, ro); lastl = lo; nl++; }