Skip to content

Commit 456c25f

Browse files
committed
Fix invalid sort after reloading query results
With this change, we use the stored sort order if it exists after reloading a query results page.
1 parent 0c571b1 commit 456c25f

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

extensions/ql-vscode/src/interface.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,8 +364,13 @@ export class InterfaceManager extends DisposableObject {
364364
(resultSet) => resultSet.name == selectedTable
365365
)!;
366366

367+
// Use sorted results path if it exists. This may happen if we are
368+
// reloading the results view after it has been sorted in the past.
369+
const resultsPath = results.sortedResultsInfo.get(selectedTable)?.resultsPath
370+
|| results.query.resultsPaths.resultsPath;
371+
367372
const chunk = await this.cliServer.bqrsDecode(
368-
results.query.resultsPaths.resultsPath,
373+
resultsPath,
369374
schema.name,
370375
{
371376
offset: schema.pagination?.offsets[0],

0 commit comments

Comments
 (0)