I’m stuck on Stage #WS9 - Retrieve data using a full-table scan.
When reading from the sample superheroes database, I’m getting unexpected varint values back when trying to parse the recordSize from the cell and the schemaBody size from the sqllite schema table.
const readVarInt = (buffer, offset) => {
let value = 0;
let bytesRead = 0;
for (let i = 0; i < 9; i += 1) {
value |= (buffer[offset + i] & 0x7f) << (7 * i);
bytesRead += 1;
if (!(buffer[offset + i] & 0x80)) {
break;
}
}
return { value, bytesRead };
};
I’m not sure what I’m doing wrong, but I was able to pass the previous tests and I’m also able to successfully parse the included samples.db database from the repository.
@joelburger Unfortunately, I can’t see your latest push in our system. The most recent one is from 2024-10-12. Could you try again or provide a link to GitHub instead?