-
Notifications
You must be signed in to change notification settings - Fork 62
Closed
Labels
🚨This issue needs some love.This issue needs some love.api: bigtableIssues related to the googleapis/nodejs-bigtable API.Issues related to the googleapis/nodejs-bigtable API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
Environment details
- OS: macOS Sierra 10.12.6
- Node.js version: v8.14.0
- npm version: 6.4.1
@google-cloud/bigtableversion: 1.0.0
Steps to reproduce
- Have a table with multiple cells in the same row
- Use
table.createReadStreamwithdecode=falseoption. - You get a
TransformError: A commit is required between row keys (...).
Example:
const options = {
prefix: 'test',
filter: [
{
column: ['a', 'b']
},
{
column: {
cellLimit: 1
}
}
],
decode: false
}
table.createReadStream(options)
.on('error', err => {
console.error(err);
})
.on('data', row => {
console.log(row.id.toString(), row.data)
})
.on('end', () => {
console.log('end');
});As the key is not being decoded, it will compare two different buffer instances and it will throw at:
nodejs-bigtable/src/chunktransformer.js
Lines 235 to 248 in ad95d12
| if ( | |
| newRowKey && | |
| chunk.rowKey && | |
| newRowKey.length !== 0 && | |
| newRowKey !== row.key | |
| ) { | |
| this.destroy( | |
| new TransformError({ | |
| message: 'A commit is required between row keys', | |
| chunk, | |
| }) | |
| ); | |
| return; | |
| } |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
🚨This issue needs some love.This issue needs some love.api: bigtableIssues related to the googleapis/nodejs-bigtable API.Issues related to the googleapis/nodejs-bigtable API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.