Skip to content

Commit

Permalink
Fix result set rendering when batches don't have results (#18414)
Browse files Browse the repository at this point in the history
  • Loading branch information
caohai authored Nov 15, 2024
1 parent d106d67 commit 8eeb0fa
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/reactviews/pages/QueryResult/queryResultPane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -311,14 +311,12 @@ export const QueryResultPane = () => {
const grids = [];
gridRefs.current.forEach((r) => r?.refreshGrid());
let count = 0;
for (
let i = 0;
i < Object.keys(metadata?.resultSetSummaries ?? []).length;
i++
) {
var batch = metadata?.resultSetSummaries[i];
for (let j = 0; j < Object.keys(batch ?? []).length; j++) {
grids.push(renderGrid(i, j, count));
for (const batchIdStr in metadata?.resultSetSummaries ?? {}) {
const batchId = parseInt(batchIdStr);
for (const resultIdStr in metadata?.resultSetSummaries[batchId] ??
{}) {
const resultId = parseInt(resultIdStr);
grids.push(renderGrid(batchId, resultId, count));
count++;
}
}
Expand Down

0 comments on commit 8eeb0fa

Please sign in to comment.