-
Notifications
You must be signed in to change notification settings - Fork 126
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
feat: implement wasNull for BigQueryResultSet #3650
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code seems fairly invasive with the hasNull plumbing, and I worry it'll be prone to error. Could we move the hasNull state computation higher up into when we do cursor advancement? Then it's just something like (pseudocode) for field in row.fields { if field.isNull() { hasNull = true }}
?
google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQueryResultImpl.java
Show resolved
Hide resolved
After reading more about java.sql.resultset, it seems my previous understanding was wrong. It's not whether the previous row had a null, its if the latest field fetched had a null, which does yield more complexity here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Marking this LGTM, modulo some comment/docs updates to clarify some of the details here we discussed out of band.
Thanks for the reviews. |
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #3648 ☕️