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.
This commit is contained in:
Andrew Eisenberg
2020-09-28 13:05:49 -07:00
parent 0c571b1942
commit 456c25f617

View File

@@ -364,8 +364,13 @@ export class InterfaceManager extends DisposableObject {
(resultSet) => resultSet.name == selectedTable
)!;
// Use sorted results path if it exists. This may happen if we are
// reloading the results view after it has been sorted in the past.
const resultsPath = results.sortedResultsInfo.get(selectedTable)?.resultsPath
|| results.query.resultsPaths.resultsPath;
const chunk = await this.cliServer.bqrsDecode(
results.query.resultsPaths.resultsPath,
resultsPath,
schema.name,
{
offset: schema.pagination?.offsets[0],