Environment details
- OS: Mac OSX 10.12.4
- Node.js version: 6.7.0
- npm version: 3.10.8
- @google-cloud/spanner version: 0.4.2
Steps to reproduce
- require
@google-cloud/spanner
- Run transaction.runStream on a large result set (~10k records)
collectionSelf.connection.runTransaction(function(err, transaction) {
if (err) {
var msg = `${name} : could not run transaction : ${JSON.stringify(err)}`;
log.error(msg);
log.error(err.stack);
reject(msg);
}
var results = [];
transaction.runStream(query)
.on('error', function(err) {
log.error(`${name} : runStream error : ${JSON.stringify(err)}`);
reject(err);
})
.on('data', function(row) {
log.silly(`${name} : runStream : ${JSON.stringify(row)}`);
results.push(row);
})
.on('end', function() {
log.debug(`${name} : runStream end`);
resolve(results);
});
});
- The following error happens
Uncaught TypeError: Cannot read property 'rowType' of null
at Function.partialResultStream.formatRow_ (node_modules/@google-cloud/spanner/src/partial-result-stream.js:167:28)
it seems that row.metadata is null in the response
https://github.com/GoogleCloudPlatform/google-cloud-node/blob/master/packages/spanner/src/partial-result-stream.js#L164
As printing out row gives the following
{"values": [<very long array of objets>,"metadata":null,"chunkedValue":false,"resumeToken":[],"stats":null}]}
Are large result sets not supported even with runStream? Thanks
Environment details
Steps to reproduce
@google-cloud/spannerUncaught TypeError: Cannot read property 'rowType' of null
at Function.partialResultStream.formatRow_ (node_modules/@google-cloud/spanner/src/partial-result-stream.js:167:28)
it seems that row.metadata is null in the response
https://github.com/GoogleCloudPlatform/google-cloud-node/blob/master/packages/spanner/src/partial-result-stream.js#L164
As printing out row gives the following
{"values": [<very long array of objets>,"metadata":null,"chunkedValue":false,"resumeToken":[],"stats":null}]}
Are large result sets not supported even with runStream? Thanks