-
Notifications
You must be signed in to change notification settings - Fork 110
Description
Environment details
- OS: Google Container OS
- Node.js version: 18.15
- npm version: 9.5.0
@google-cloud/spanner
version: 5.18.0
Steps to reproduce
This error is inconsistently happening its similar to issues #197 and #180
The code which gives error
const rowsStream = spannerDb.runStream({ sql:
SELECT * FROM ${TABLE_NAME} ORDER BY storeId, started DESC, json: true, });
Error thrown as below
GoogleError: Serializing column "started" encountered an error: Integer 211959131678161148 is out of bounds. Call row.toJSON({ wrapNumbers: true }) to receive a custom type. at Int.valueOf (/opt/app/node_modules/@google-cloud/spanner/build/src/codec.js:121:19) at convertValueToJson (/opt/app/node_modules/@google-cloud/spanner/build/src/codec.js:263:22) at Object.convertFieldsToJson (/opt/app/node_modules/@google-cloud/spanner/build/src/codec.js:239:31) at Array.value (/opt/app/node_modules/@google-cloud/spanner/build/src/partial-result-stream.js:206:38) at PartialResultStream._addValue (/opt/app/node_modules/@google-cloud/spanner/build/src/partial-result-stream.js:187:34) at /opt/app/node_modules/@google-cloud/spanner/build/src/partial-result-stream.js:163:24 at Array.forEach (<anonymous>) at PartialResultStream._addChunk (/opt/app/node_modules/@google-cloud/spanner/build/src/partial-result-stream.js:162:16) at PartialResultStream._transform (/opt/app/node_modules/@google-cloud/spanner/build/src/partial-result-stream.js:85:24) at Transform._write (node:internal/streams/transform:175:8) at obj.<computed> [as _write] (/opt/app/node_modules/stubs/index.js:26:26) at doWrite (node:internal/streams/writable:411:12) at clearBuffer (node:internal/streams/writable:572:7) at onwrite (node:internal/streams/writable:464:7) at node:internal/streams/transform:190:7 at PartialResultStream._tryResume (/opt/app/node_modules/@google-cloud/spanner/build/src/partial-result-stream.js:108:13)
started column in table doesn't has the value '211959131678161148' thrown. The storeId column has this value. Looks like it swapped or wrongly mapping the values for columns.
This error not thrown always and not reproducible in local as well.
Thanks!