TypeError: Cannot read properties of undefined (reading 'mode')
at <anonymous> (src/bigquery.ts:615:25)
at Array.map (<anonymous>)
at mergeSchema (src/bigquery.ts:612:21)
at Array.map (<anonymous>)
at Function.mergeSchemaWithRows_ (src/bigquery.ts:609:25)
at onComplete (src/table.ts:1843:23)
at <anonymous> (src/table.ts:1891:9)
at Table.table.request (test/table.ts:2220:11)
at Table.getRows (src/table.ts:1860:10)
at Table.wrapper (node_modules/@google-cloud/promisify/build/src/index.js:30:35)
at Context.<anonymous> (test/table.ts:2222:15)
at process.processImmediate (node:internal/timers:476:21)
at process.callbackTrampoline (node:internal/async_hooks:128:17)
Please make sure you have searched for information in the following guides.
A screenshot that you have tested with "Try this API".
https://gist.github.com/jonathan-lande-cyera/900eba3c30f58394ad2bffe4f5d2dffa
https://gist.github.com/jonathan-lande-cyera/900eba3c30f58394ad2bffe4f5d2dffa
https://gist.github.com/jonathan-lande-cyera/900eba3c30f58394ad2bffe4f5d2dffa
https://gist.github.com/jonathan-lande-cyera/900eba3c30f58394ad2bffe4f5d2dffa
https://gist.github.com/jonathan-lande-cyera/900eba3c30f58394ad2bffe4f5d2dffa
https://gist.github.com/jonathan-lande-cyera/900eba3c30f58394ad2bffe4f5d2dffa
https://gist.github.com/jonathan-lande-cyera/900eba3c30f58394ad2bffe4f5d2dffa
https://gist.github.com/jonathan-lande-cyera/900eba3c30f58394ad2bffe4f5d2dffa
https://gist.github.com/jonathan-lande-cyera/900eba3c30f58394ad2bffe4f5d2dffa
https://gist.github.com/jonathan-lande-cyera/900eba3c30f58394ad2bffe4f5d2dffa
https://gist.github.com/jonathan-lande-cyera/900eba3c30f58394ad2bffe4f5d2dffa
https://gist.github.com/jonathan-lande-cyera/900eba3c30f58394ad2bffe4f5d2dffa
Link to the code that reproduces this issue. A link to a public Github Repository or gist with a minimal reproduction.
https://gist.github.com/jonathan-lande-cyera/900eba3c30f58394ad2bffe4f5d2dffa
OR
https://github.com/jonathan-lande-cyera/nodejs-bigquery/blob/a9b6215aecd3227e009f6808c798f4661754ab55/test/table.ts#L2193C1-L2233C8
A step-by-step description of how to reproduce the issue, based on the linked reproduction.
test/table.tsunderdescribe('getRows')A clear and concise description of what the bug is, and what you expected to happen.
When calling
table.getRowsmore than once, each time with differentselectedFields- the method fails with:It looks like the table object's
metadata.schema.fieldsis affected by the previous call togetRowsand becomes an empty array on the second call, causing the method to fail.A clear and concise description WHY you expect this behavior, i.e., was it a recent change, there is documentation that points to this behavior, etc. **
Calling
getRowswith validselectedFieldsvalues corresponding to existing columns in the table shouldn't throw an exception.