Bug in table.getRows when using different selectedFields in consecutive calls #1431
Closed
7 tasks done
Labels
api: bigquery
Issues related to the googleapis/nodejs-bigquery API.
Please make sure you have searched for information in the following guides.
A screenshot that you have tested with "Try this API".
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
A step-by-step description of how to reproduce the issue, based on the linked reproduction.
test/table.ts
underdescribe('getRows')
Here is a fork with the test already added to
test/table.ts
: https://github.com/jonathan-lande-cyera/nodejs-bigquery/blob/main/test/table.ts#L2193C1-L2233C8A clear and concise description of what the bug is, and what you expected to happen.
When calling
table.getRows
more than once, each time with differentselectedFields
- the method fails with:It looks like the table object's
metadata.schema.fields
is affected by the previous call togetRows
and 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 getRows with valid
selectedFields
values corresponding to existing columns in the table shouldn't throw an exception.The text was updated successfully, but these errors were encountered: