While i was trying to create a graph with the wikipedia links, i faced a "non existing vertex" problem just after to start adding edges. After some minutes of debugging and SQL manual checking, I found out that the PageIterator class always skips the first page of the database. I fixed my local version, here is the tip:
Looking to the PageIterator.fillBuffer() method, you can see a loop like:
The problem is that before this loop, there is a rs.first() call which moves the cursor to the first result row... When the rs.next() is checked in the first while loop iteration, the cursor is moved again, skipping the first result.
To solve the problem just use do..while() instead of while()...
Log in to post a comment.