Skip to content

Commit 666c26e

Browse files
committed
Permit performance comparisons across DBs
The snippet seems to have been copied from 'findOtherQueryToCompare' where it makes sense, but in the context of a performance comparison we don't need this restriction.
1 parent bba31c0 commit 666c26e

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

extensions/ql-vscode/src/query-history/query-history-manager.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,18 +1128,13 @@ export class QueryHistoryManager extends DisposableObject {
11281128
fromItem: CompletedLocalQueryInfo,
11291129
allSelectedItems: CompletedLocalQueryInfo[],
11301130
): Promise<CompletedLocalQueryInfo | undefined> {
1131-
const dbName = fromItem.databaseName;
1132-
11331131
// If exactly 2 items are selected, return the one that
11341132
// isn't being used as the "from" item.
11351133
if (allSelectedItems.length === 2) {
11361134
const otherItem =
11371135
fromItem === allSelectedItems[0]
11381136
? allSelectedItems[1]
11391137
: allSelectedItems[0];
1140-
if (otherItem.databaseName !== dbName) {
1141-
throw new Error("Query databases must be the same.");
1142-
}
11431138
return otherItem;
11441139
}
11451140

@@ -1150,10 +1145,7 @@ export class QueryHistoryManager extends DisposableObject {
11501145
// Otherwise, present a dialog so the user can choose the item they want to use.
11511146
const comparableQueryLabels = this.treeDataProvider.allHistory
11521147
.filter(this.isSuccessfulCompletedLocalQueryInfo)
1153-
.filter(
1154-
(otherItem) =>
1155-
otherItem !== fromItem && otherItem.databaseName === dbName,
1156-
)
1148+
.filter((otherItem) => otherItem !== fromItem)
11571149
.map((item) => ({
11581150
label: this.labelProvider.getLabel(item),
11591151
description: item.databaseName,

0 commit comments

Comments
 (0)