@@ -2,19 +2,15 @@ import { ViewColumn } from "vscode";
22
33import {
44 FromCompareViewMessage ,
5- ToCompareViewMessage ,
65 QueryCompareResult ,
6+ ToCompareViewMessage ,
77} from "../common/interface-types" ;
88import { Logger , showAndLogExceptionWithTelemetry } from "../common/logging" ;
99import { extLogger } from "../common/logging/vscode" ;
1010import { CodeQLCliServer } from "../codeql-cli/cli" ;
1111import { DatabaseManager } from "../databases/local-databases" ;
1212import { jumpToLocation } from "../databases/local-databases/locations" ;
13- import {
14- transformBqrsResultSet ,
15- RawResultSet ,
16- BQRSInfo ,
17- } from "../common/bqrs-cli-types" ;
13+ import { BQRSInfo , DecodedBqrsChunk } from "../common/bqrs-cli-types" ;
1814import resultsDiff from "./resultsDiff" ;
1915import { CompletedLocalQueryInfo } from "../query-results" ;
2016import { assertNever , getErrorMessage } from "../common/helpers-pure" ;
@@ -122,7 +118,7 @@ export class CompareView extends AbstractWebview<
122118 time : to . startTime ,
123119 } ,
124120 } ,
125- columns : fromResultSet . schema . columns ,
121+ columns : fromResultSet . columns ,
126122 commonResultSetNames,
127123 currentResultSetName,
128124 rows,
@@ -197,7 +193,7 @@ export class CompareView extends AbstractWebview<
197193 private async findCommonResultSetNames (
198194 { from, fromSchemas, to, toSchemas } : ComparePair ,
199195 selectedResultSetName : string | undefined ,
200- ) : Promise < [ string [ ] , string , RawResultSet , RawResultSet ] > {
196+ ) : Promise < [ string [ ] , string , DecodedBqrsChunk , DecodedBqrsChunk ] > {
201197 const {
202198 commonResultSetNames,
203199 currentResultSetDisplayName,
@@ -231,20 +227,19 @@ export class CompareView extends AbstractWebview<
231227 bqrsInfo : BQRSInfo ,
232228 resultSetName : string ,
233229 resultsPath : string ,
234- ) : Promise < RawResultSet > {
230+ ) : Promise < DecodedBqrsChunk > {
235231 const schema = bqrsInfo [ "result-sets" ] . find (
236232 ( schema ) => schema . name === resultSetName ,
237233 ) ;
238234 if ( ! schema ) {
239235 throw new Error ( `Schema ${ resultSetName } not found.` ) ;
240236 }
241- const chunk = await this . cliServer . bqrsDecode ( resultsPath , resultSetName ) ;
242- return transformBqrsResultSet ( schema , chunk ) ;
237+ return await this . cliServer . bqrsDecode ( resultsPath , resultSetName ) ;
243238 }
244239
245240 private compareResults (
246- fromResults : RawResultSet ,
247- toResults : RawResultSet ,
241+ fromResults : DecodedBqrsChunk ,
242+ toResults : DecodedBqrsChunk ,
248243 ) : QueryCompareResult {
249244 // Only compare columns that have the same name
250245 return resultsDiff ( fromResults , toResults ) ;
0 commit comments