Notebooks: Fix query results not displaying table rows (#13488)

* fix PQSQL queries not displaying rows

* comment

* change comment and fix unit test
This commit is contained in:
Lucy Zhang
2020-11-20 15:31:01 -08:00
committed by GitHub
parent 6edcbbb738
commit aa30b52d03
2 changed files with 5 additions and 1 deletions

View File

@@ -69,7 +69,7 @@ suite('SQL Future', function () {
queryRunner.setup(x => x.getQueryRows(TypeMoq.It.isAny(), TypeMoq.It.isAny(), TypeMoq.It.isAny(), TypeMoq.It.isAny())).returns(() => Promise.resolve(subset));
sqlFuture.handleResultSet(resultSet);
await sqlFuture.queryAndConvertData(resultSet, 0);
await sqlFuture.handleDone();
sinon.assert.calledWith(handleSpy, expectedMsg);
});
});

View File

@@ -527,6 +527,10 @@ export class SQLFuture extends Disposable implements FutureInternal {
this._dataToSaveMap.set(key, data);
this._rowsMap.set(key, []);
this.sendIOPubMessage(data, set);
// If rows are returned in the initial result set, make sure to convert and send to notebook
if (set.rowCount > 0) {
this.handleResultSetUpdate(set);
}
}
}