Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReadClient throws on null values #518

Closed
kitsunde opened this issue Oct 15, 2024 · 1 comment · Fixed by #519
Closed

ReadClient throws on null values #518

kitsunde opened this issue Oct 15, 2024 · 1 comment · Fixed by #519
Assignees
Labels
api: bigquerystorage Issues related to the googleapis/nodejs-bigquery-storage API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@kitsunde
Copy link

kitsunde commented Oct 15, 2024

https://github.com/googleapis/nodejs-bigquery-storage/blob/main/src/reader/arrow_transform.ts#L146 this can be null and null is an object, which causes nullable fields to throw. For example in this case:

fieldData.toString();
>>> {"column_name": null}

Then it gets passed to https://github.com/googleapis/nodejs-bigquery-storage/blob/main/src/reader/arrow_transform.ts#L159 and enter the object path because typeof null === 'object' is true then break on Object.keys(null) in https://github.com/googleapis/nodejs-bigquery-storage/blob/main/src/reader/arrow_transform.ts#L168

TypeError: Cannot convert undefined or null to object

@kitsunde kitsunde added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Oct 15, 2024
@product-auto-label product-auto-label bot added the api: bigquerystorage Issues related to the googleapis/nodejs-bigquery-storage API. label Oct 15, 2024
@alvarowolfx alvarowolfx self-assigned this Oct 15, 2024
@alvarowolfx
Copy link
Contributor

thanks for the report @kitsunde, I'll work on fixing that and improving the test coverage for that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquerystorage Issues related to the googleapis/nodejs-bigquery-storage API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants