Skip to content

Commit cc10e8e

Browse files
Make fields in PipelineRun optional
1 parent 861e4bd commit cc10e8e

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

extensions/ql-vscode/src/log-insights/join-order.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ class JoinOrderScanner implements EvaluationLogScanner {
488488
// Pointwise sum the tuple counts
489489
const newTupleCounts = pointwiseSum(
490490
bucket.tupleCounts,
491-
new Int32Array(run.counts),
491+
new Int32Array(run.counts ?? []),
492492
this.problemReporter,
493493
);
494494
const resultSize = bucket.resultSize + deltaSize;

extensions/ql-vscode/src/log-insights/log-summary.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export interface PipelineRun {
22
raReference: string;
3-
counts: number[];
4-
duplicationPercentages: number[];
3+
counts?: number[];
4+
duplicationPercentages?: number[];
55
}
66

77
interface Ra {

extensions/ql-vscode/src/log-insights/performance-comparison.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,9 @@ export class PerformanceOverviewScanner implements EvaluationLogScanner {
151151
pipelineSummaryList,
152152
} = this.data;
153153
const pipelineSummaries = pipelineSummaryList[index];
154-
for (const { counts, raReference } of event.pipelineRuns ?? []) {
154+
for (const pipelineRun of event.pipelineRuns ?? []) {
155+
const counts = pipelineRun.counts || [];
156+
const raReference = pipelineRun.raReference;
155157
// Get or create the pipeline summary for this RA
156158
const pipelineSummary = (pipelineSummaries[raReference] ??= {
157159
steps: event.ra[raReference],

0 commit comments

Comments
 (0)