Skip to content

Commit c7ef34f

Browse files
authored
Data Explorer: Fix data loading regression in DuckDB extension (#5646)
Addresses regression introduced in #5644.
1 parent be57de1 commit c7ef34f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

extensions/positron-duckdb/src/extension.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,10 @@ END`;
878878
const fetchValues = (adapter: (field: Vector<any>, i: number) => ColumnValue) => {
879879
if ('first_index' in spec) {
880880
// There may be fewer rows available than what was requested
881-
const lastIndex = Math.min(spec.last_index, queryResult.numRows - 1);
881+
const lastIndex = Math.min(
882+
spec.last_index,
883+
spec.first_index + queryResult.numRows - 1
884+
);
882885

883886
const columnValues: Array<string | number> = [];
884887
// Value range, we need to extract the actual slice requested

0 commit comments

Comments
 (0)